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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc

Issue 2334623003: Store net::ProxyServer in HttpResponseInfo object (Closed)
Patch Set: Rebased, fix compile error Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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 0b7b3fcf3aabc1647d97fa27013c06d75d88fd96..d9607104d519e3951917ddb93d763b373fee2bda 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
@@ -170,7 +170,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
@@ -260,7 +260,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);

Powered by Google App Engine
This is Rietveld 408576698