| Index: net/proxy/proxy_service.cc
|
| diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
|
| index a1d634a75843d53f820b85861d42f3457676b1a6..a27ab980b3692b7403ffb05cc9a02a2045be6dc6 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,16 @@ 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,
|
|
|