| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
|
| index 50a303cf7849faa3f32a8787cafbe931c7e41573..9de8165d996f098cb9b52e1917895ffd55b4ed93 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
|
| @@ -215,12 +215,24 @@ DataReductionProxyIOData::CreateNetworkDelegate(
|
| return network_delegate.Pass();
|
| }
|
|
|
| +// TODO(kundaji): Rename this method to something more descriptive.
|
| +// Bug http://crbug/488190.
|
| void DataReductionProxyIOData::SetProxyPrefs(bool enabled,
|
| bool alternative_enabled,
|
| bool at_startup) {
|
| DCHECK(io_task_runner_->BelongsToCurrentThread());
|
| + DCHECK(url_request_context_getter_->GetURLRequestContext()->proxy_service());
|
| enabled_ = enabled;
|
| config_->SetProxyConfig(enabled, alternative_enabled, at_startup);
|
| +
|
| + // If Data Saver is disabled, reset data reduction proxy state.
|
| + if (!enabled) {
|
| + net::ProxyService* proxy_service =
|
| + url_request_context_getter_->GetURLRequestContext()->proxy_service();
|
| + proxy_service->ClearBadProxiesCache();
|
| + bypass_stats_->ClearRequestCounts();
|
| + bypass_stats_->NotifyUnavailabilityIfChanged();
|
| + }
|
| }
|
|
|
| void DataReductionProxyIOData::UpdateContentLengths(
|
|
|