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

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: 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 int64 adjusted_original_content_length = 579 int64 adjusted_original_content_length =
580 data_reduction_proxy::GetAdjustedOriginalContentLength( 580 data_reduction_proxy::GetAdjustedOriginalContentLength(
581 request_type, original_content_length, 581 request_type, original_content_length,
582 received_content_length); 582 received_content_length);
583 AccumulateContentLength(received_content_length, 583 AccumulateContentLength(received_content_length,
584 adjusted_original_content_length, 584 adjusted_original_content_length,
585 request_type); 585 request_type);
586 RecordContentLengthHistograms(received_content_length, 586 RecordContentLengthHistograms(received_content_length,
587 original_content_length, 587 original_content_length,
588 freshness_lifetime); 588 freshness_lifetime);
589
589 if (data_reduction_proxy_enabled_ && 590 if (data_reduction_proxy_enabled_ &&
590 data_reduction_proxy_usage_stats_ && 591 data_reduction_proxy_usage_stats_ &&
591 !proxy_config_getter_.is_null()) { 592 !proxy_config_getter_.is_null()) {
593 data_reduction_proxy_usage_stats_->RecordMissingViaHeaderBytes(request);
mmenke 2014/09/18 18:39:30 This function name is very confusing, since it's a
sclittle 2014/09/19 01:05:01 Done.
594
592 data_reduction_proxy_usage_stats_->RecordBypassedBytesHistograms( 595 data_reduction_proxy_usage_stats_->RecordBypassedBytesHistograms(
593 *request, 596 *request,
594 *data_reduction_proxy_enabled_, 597 *data_reduction_proxy_enabled_,
595 proxy_config_getter_.Run()); 598 proxy_config_getter_.Run());
596 } 599 }
597 DVLOG(2) << __FUNCTION__ 600 DVLOG(2) << __FUNCTION__
598 << " received content length: " << received_content_length 601 << " received content length: " << received_content_length
599 << " original content length: " << original_content_length 602 << " original content length: " << original_content_length
600 << " url: " << request->url(); 603 << " url: " << request->url();
601 } 604 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 data_reduction_proxy::DataReductionProxyRequestType request_type) { 836 data_reduction_proxy::DataReductionProxyRequestType request_type) {
834 DCHECK_GE(received_content_length, 0); 837 DCHECK_GE(received_content_length, 0);
835 DCHECK_GE(original_content_length, 0); 838 DCHECK_GE(original_content_length, 0);
836 StoreAccumulatedContentLength(received_content_length, 839 StoreAccumulatedContentLength(received_content_length,
837 original_content_length, 840 original_content_length,
838 request_type, 841 request_type,
839 reinterpret_cast<Profile*>(profile_)); 842 reinterpret_cast<Profile*>(profile_));
840 received_content_length_ += received_content_length; 843 received_content_length_ += received_content_length;
841 original_content_length_ += original_content_length; 844 original_content_length_ += original_content_length;
842 } 845 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698