| 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 01f0901e9bf8e0507e6b2405bab03215b550c199..a4cc7bdcb3b66b566a8661ffbb2352e7b100832f 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
|
| @@ -150,27 +150,36 @@ void DataReductionProxyBypassStats::OnUrlRequestCompleted(
|
| // LOAD_BYPASS_PROXY is necessary because the proxy_server() in the |request|
|
| // might still be set to the data reduction proxy if |request| was retried
|
| // over direct and a network error occurred while retrying it.
|
| - if (data_reduction_proxy_config_->WasDataReductionProxyUsed(request,
|
| - &proxy_info) &&
|
| - (request->load_flags() & net::LOAD_BYPASS_PROXY) == 0 &&
|
| - net_error == net::OK) {
|
| - successful_requests_through_proxy_count_++;
|
| - NotifyUnavailabilityIfChanged();
|
| -
|
| - // Report the success counts.
|
| + if (!data_reduction_proxy_config_->WasDataReductionProxyUsed(request,
|
| + &proxy_info) ||
|
| + (request->load_flags() & net::LOAD_BYPASS_PROXY) != 0 ||
|
| + net_error != net::OK) {
|
| + return;
|
| + }
|
| + successful_requests_through_proxy_count_++;
|
| + NotifyUnavailabilityIfChanged();
|
| +
|
| + // Report the success counts.
|
| + UMA_HISTOGRAM_COUNTS_100(
|
| + "DataReductionProxy.SuccessfulRequestCompletionCounts",
|
| + proxy_info.proxy_index);
|
| +
|
| + DCHECK(request->proxy_server().host_port_pair().Equals(
|
| + proxy_info.proxy_servers.front().host_port_pair()));
|
| +
|
| + // It is possible that the scheme of request->proxy_server() is different
|
| + // from the scheme of proxy_info.proxy_servers.front(). The former may be set
|
| + // to QUIC by the network stack, while the latter may be set to HTTPS.
|
| +
|
| + UMA_HISTOGRAM_ENUMERATION(
|
| + "DataReductionProxy.ProxySchemeUsed",
|
| + ConvertNetProxySchemeToProxyScheme(request->proxy_server().scheme()),
|
| + PROXY_SCHEME_MAX);
|
| + if (request->load_flags() & net::LOAD_MAIN_FRAME_DEPRECATED) {
|
| UMA_HISTOGRAM_COUNTS_100(
|
| - "DataReductionProxy.SuccessfulRequestCompletionCounts",
|
| + "DataReductionProxy.SuccessfulRequestCompletionCounts.MainFrame",
|
| proxy_info.proxy_index);
|
| - UMA_HISTOGRAM_ENUMERATION("DataReductionProxy.ProxySchemeUsed",
|
| - ConvertNetProxySchemeToProxyScheme(
|
| - proxy_info.proxy_servers[0].scheme()),
|
| - PROXY_SCHEME_MAX);
|
| - if (request->load_flags() & net::LOAD_MAIN_FRAME_DEPRECATED) {
|
| - UMA_HISTOGRAM_COUNTS_100(
|
| - "DataReductionProxy.SuccessfulRequestCompletionCounts.MainFrame",
|
| - proxy_info.proxy_index);
|
| }
|
| - }
|
| }
|
|
|
| void DataReductionProxyBypassStats::SetBypassType(
|
|
|