Index: net/proxy/proxy_service.cc |
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc |
index a1d634a75843d53f820b85861d42f3457676b1a6..a7222abb2a6d9886d7201328d9b0586809fa5bef 100644 |
--- a/net/proxy/proxy_service.cc |
+++ b/net/proxy/proxy_service.cc |
@@ -1206,20 +1206,24 @@ int ProxyService::ReconsiderProxyAfterError(const GURL& url, |
return ResolveProxy(url, load_flags, result, callback, pac_request, |
network_delegate, net_log); |
} |
- |
-#if defined(SPDY_PROXY_AUTH_ORIGIN) |
- if (result->proxy_server().isDataReductionProxy()) { |
- RecordDataReductionProxyBypassInfo( |
- true, false, result->proxy_server(), NETWORK_ERROR); |
- RecordDataReductionProxyBypassOnNetworkError( |
- true, result->proxy_server(), net_error); |
- } else if (result->proxy_server().isDataReductionProxyFallback()) { |
- RecordDataReductionProxyBypassInfo( |
- false, false, result->proxy_server(), NETWORK_ERROR); |
- RecordDataReductionProxyBypassOnNetworkError( |
- false, result->proxy_server(), net_error); |
+ // TODO(kundaji): Make this a callback to remove dependency on data reduction |
+ // proxy related classes. |
+ const net::ProxyServer& proxy_server = result->proxy_server(); |
+ if (proxy_server.is_valid() && !proxy_server.is_direct()) { |
+ if (proxy_server.host_port_pair().Equals( |
+ data_reduction_default_origin_)) { |
+ RecordDataReductionProxyBypassInfo( |
+ true, false, proxy_server, NETWORK_ERROR); |
+ RecordDataReductionProxyBypassOnNetworkError( |
+ true, proxy_server, net_error); |
+ } else if (proxy_server.host_port_pair().Equals( |
+ data_reduction_default_fallback_origin_)) { |
+ RecordDataReductionProxyBypassInfo( |
+ false, false, proxy_server, NETWORK_ERROR); |
+ RecordDataReductionProxyBypassOnNetworkError( |
+ false, proxy_server, net_error); |
+ } |
} |
-#endif |
// We don't have new proxy settings to try, try to fallback to the next proxy |
// in the list. |
@@ -1398,6 +1402,17 @@ void ProxyService::ForceReloadProxyConfig() { |
ApplyProxyConfigIfAvailable(); |
} |
+void ProxyService::SetDataReductionProxyOrigins( |
+ const std::string& data_reduction_default_origin, |
+ const std::string& data_reduction_default_fallback_origin) { |
+ DCHECK(CalledOnValidThread()); |
+ data_reduction_default_origin_ = |
+ net::HostPortPair::FromURL(GURL(data_reduction_default_origin)); |
+ data_reduction_default_fallback_origin_ = |
+ net::HostPortPair::FromURL(GURL(data_reduction_default_fallback_origin)); |
+ |
Alexei Svitkine (slow)
2014/07/21 20:25:35
Nit: Remove extra line.
Not at Google. Contact bengr
2014/07/21 21:45:09
Done.
|
+} |
+ |
// static |
ProxyConfigService* ProxyService::CreateSystemProxyConfigService( |
base::SingleThreadTaskRunner* io_thread_task_runner, |