Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 577343002: Adds UMA to measure when the data reduction proxy via header is missing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 int64 adjusted_original_content_length = 586 int64 adjusted_original_content_length =
587 data_reduction_proxy::GetAdjustedOriginalContentLength( 587 data_reduction_proxy::GetAdjustedOriginalContentLength(
588 request_type, original_content_length, 588 request_type, original_content_length,
589 received_content_length); 589 received_content_length);
590 AccumulateContentLength(received_content_length, 590 AccumulateContentLength(received_content_length,
591 adjusted_original_content_length, 591 adjusted_original_content_length,
592 request_type); 592 request_type);
593 RecordContentLengthHistograms(received_content_length, 593 RecordContentLengthHistograms(received_content_length,
594 original_content_length, 594 original_content_length,
595 freshness_lifetime); 595 freshness_lifetime);
596
596 if (data_reduction_proxy_enabled_ && 597 if (data_reduction_proxy_enabled_ &&
597 data_reduction_proxy_usage_stats_ && 598 data_reduction_proxy_usage_stats_ &&
598 !proxy_config_getter_.is_null()) { 599 !proxy_config_getter_.is_null()) {
599 data_reduction_proxy_usage_stats_->RecordBypassedBytesHistograms( 600 data_reduction_proxy_usage_stats_->RecordBytesHistograms(
600 *request, 601 *request,
601 *data_reduction_proxy_enabled_, 602 *data_reduction_proxy_enabled_,
602 proxy_config_getter_.Run()); 603 proxy_config_getter_.Run());
603 } 604 }
604 DVLOG(2) << __FUNCTION__ 605 DVLOG(2) << __FUNCTION__
605 << " received content length: " << received_content_length 606 << " received content length: " << received_content_length
606 << " original content length: " << original_content_length 607 << " original content length: " << original_content_length
607 << " url: " << request->url(); 608 << " url: " << request->url();
608 } 609 }
609 610
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 if (data_reduction_proxy_statistics_prefs_) { 844 if (data_reduction_proxy_statistics_prefs_) {
844 StoreAccumulatedContentLength(received_content_length, 845 StoreAccumulatedContentLength(received_content_length,
845 original_content_length, 846 original_content_length,
846 request_type, 847 request_type,
847 reinterpret_cast<Profile*>(profile_), 848 reinterpret_cast<Profile*>(profile_),
848 data_reduction_proxy_statistics_prefs_); 849 data_reduction_proxy_statistics_prefs_);
849 } 850 }
850 received_content_length_ += received_content_length; 851 received_content_length_ += received_content_length;
851 original_content_length_ += original_content_length; 852 original_content_length_ += original_content_length;
852 } 853 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698