Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc |
index 3aa6b85d42d790a99c0a7436f4bad587d4f719cd..718c1f234b06545e9035e04ea78503e606db26b0 100644 |
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc |
@@ -100,8 +100,8 @@ void DataReductionProxyBypassStats::RecordDataReductionProxyBypassInfo( |
// static |
void DataReductionProxyBypassStats::DetectAndRecordMissingViaHeaderResponseCode( |
bool is_primary, |
- const net::HttpResponseHeaders* headers) { |
- if (HasDataReductionProxyViaHeader(headers, NULL)) { |
+ const net::HttpResponseHeaders& headers) { |
+ if (HasDataReductionProxyViaHeader(headers, nullptr)) { |
// The data reduction proxy via header is present, so don't record anything. |
return; |
} |
@@ -109,11 +109,11 @@ void DataReductionProxyBypassStats::DetectAndRecordMissingViaHeaderResponseCode( |
if (is_primary) { |
UMA_HISTOGRAM_SPARSE_SLOWLY( |
"DataReductionProxy.MissingViaHeader.ResponseCode.Primary", |
- headers->response_code()); |
+ headers.response_code()); |
} else { |
UMA_HISTOGRAM_SPARSE_SLOWLY( |
"DataReductionProxy.MissingViaHeader.ResponseCode.Fallback", |
- headers->response_code()); |
+ headers.response_code()); |
} |
} |
@@ -385,7 +385,7 @@ void DataReductionProxyBypassStats::RecordMissingViaHeaderBytes( |
if (!data_reduction_proxy_config_->WasDataReductionProxyUsed(&request, |
NULL) || |
- HasDataReductionProxyViaHeader(request.response_headers(), NULL)) { |
+ HasDataReductionProxyViaHeader(*request.response_headers(), NULL)) { |
// Only track requests that used the data reduction proxy and had responses |
// that were missing the data reduction proxy via header. |
return; |
@@ -537,6 +537,11 @@ void DataReductionProxyBypassStats::RecordBypassedBytes( |
"Status503HttpServiceUnavailable", |
content_length); |
break; |
+ case BYPASS_EVENT_TYPE_URL_REDIRECT_CYCLE: |
+ UMA_HISTOGRAM_COUNTS( |
+ "DataReductionProxy.BypassedBytes.URLRedirectCycle", |
+ content_length); |
+ break; |
default: |
break; |
} |