Chromium Code Reviews| Index: net/proxy/proxy_service.cc |
| diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc |
| index a1d634a75843d53f820b85861d42f3457676b1a6..3f153f607454dad328b7b7e7b6cc528cffbdb015 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); |
| + } |
| } |
|
Ryan Sleevi
2014/07/22 08:22:25
To be clear: A callback is (almost certainly) the
bengr
2014/07/22 19:57:15
For another change I looked into what it would tak
|
| -#endif |
| // We don't have new proxy settings to try, try to fallback to the next proxy |
| // in the list. |
| @@ -1398,6 +1402,16 @@ void ProxyService::ForceReloadProxyConfig() { |
| ApplyProxyConfigIfAvailable(); |
| } |
| +void ProxyService::SetDataReductionProxyOrigins( |
| + const GURL& data_reduction_default_origin, |
| + const GURL& data_reduction_default_fallback_origin) { |
| + DCHECK(CalledOnValidThread()); |
| + data_reduction_default_origin_ = |
| + net::HostPortPair::FromURL(data_reduction_default_origin); |
| + data_reduction_default_fallback_origin_ = |
| + net::HostPortPair::FromURL(data_reduction_default_fallback_origin); |
|
Ryan Sleevi
2014/07/22 08:22:25
This very concept - of two origins for data reduct
bengr
2014/07/22 19:57:15
I completely agree.
|
| +} |
| + |
| // static |
| ProxyConfigService* ProxyService::CreateSystemProxyConfigService( |
| base::SingleThreadTaskRunner* io_thread_task_runner, |