Index: net/proxy/proxy_service.cc |
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc |
index a1d634a75843d53f820b85861d42f3457676b1a6..a5d5ffce907efcf35bf1228fa575af24c22bdcc8 100644 |
--- a/net/proxy/proxy_service.cc |
+++ b/net/proxy/proxy_service.cc |
@@ -1206,20 +1206,22 @@ 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); |
+ const net::ProxyServer& proxy_server = result->proxy_server(); |
bengr
2014/07/18 19:41:44
Instead of doing it this way, it would probably be
Not at Google. Contact bengr
2014/07/21 17:46:26
Good idea. I went down the path of trying to do it
|
+ 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 +1400,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)); |
+ |
+} |
+ |
// static |
ProxyConfigService* ProxyService::CreateSystemProxyConfigService( |
base::SingleThreadTaskRunner* io_thread_task_runner, |