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 cce040151145eee51ee255b3a9005d46c0e1a3d8..2e4766324123ad5ae747bcb315a6a3057d942e81 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 |
@@ -168,7 +168,7 @@ void DataReductionProxyBypassStats::OnProxyFallback( |
DataReductionProxyTypeInfo data_reduction_proxy_info; |
if (bypassed_proxy.is_valid() && !bypassed_proxy.is_direct() && |
data_reduction_proxy_config_->IsDataReductionProxy( |
- bypassed_proxy.host_port_pair(), &data_reduction_proxy_info)) { |
+ bypassed_proxy, &data_reduction_proxy_info)) { |
proxy_net_errors_count_++; |
// To account for the case when the proxy is reachable for sometime, and |
@@ -258,7 +258,8 @@ void DataReductionProxyBypassStats::RecordBypassedBytesHistograms( |
// proxy configuration resolves to anything other than direct:// for a URL, |
// the data reduction proxy will not be used. |
DCHECK(data_reduction_proxy_type_info.proxy_servers.empty()); |
- if (!request.proxy_server().IsEmpty()) { |
+ if (request.proxy_server().is_valid() && |
+ !request.proxy_server().is_direct()) { |
RecordBypassedBytes(last_bypass_type_, |
DataReductionProxyBypassStats::PROXY_OVERRIDDEN, |
content_length); |