| 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 5a86b16c09e6bcbb5dd14965cc1893fb36e1b177..8b74b49e1c3783d36de716d879d4c97c5fbb96cc 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
|
| @@ -142,22 +142,23 @@ DataReductionProxyIOData::DataReductionProxyIOData(
|
| // It is safe to use base::Unretained here, since it gets executed
|
| // synchronously on the IO thread, and |this| outlives the caller (since the
|
| // caller is owned by |this|.
|
| config_client_.reset(new DataReductionProxyConfigServiceClient(
|
| std::move(params), GetBackoffPolicy(), request_options_.get(),
|
| raw_mutable_config, config_.get(), event_creator_.get(), net_log_,
|
| base::Bind(&DataReductionProxyIOData::StoreSerializedConfig,
|
| base::Unretained(this))));
|
| }
|
|
|
| - proxy_delegate_.reset(
|
| - new DataReductionProxyDelegate(request_options_.get(), config_.get()));
|
| + proxy_delegate_.reset(new DataReductionProxyDelegate(
|
| + request_options_.get(), config_.get(), configurator_.get(),
|
| + event_creator_.get(), bypass_stats_.get(), net_log_));
|
| }
|
|
|
| DataReductionProxyIOData::DataReductionProxyIOData()
|
| : client_(Client::UNKNOWN),
|
| net_log_(nullptr),
|
| url_request_context_getter_(nullptr),
|
| weak_factory_(this) {
|
| }
|
|
|
| DataReductionProxyIOData::~DataReductionProxyIOData() {
|
| @@ -214,27 +215,34 @@ DataReductionProxyIOData::CreateInterceptor() {
|
| }
|
|
|
| scoped_ptr<DataReductionProxyNetworkDelegate>
|
| DataReductionProxyIOData::CreateNetworkDelegate(
|
| scoped_ptr<net::NetworkDelegate> wrapped_network_delegate,
|
| bool track_proxy_bypass_statistics) {
|
| DCHECK(io_task_runner_->BelongsToCurrentThread());
|
| scoped_ptr<DataReductionProxyNetworkDelegate> network_delegate(
|
| new DataReductionProxyNetworkDelegate(
|
| std::move(wrapped_network_delegate), config_.get(),
|
| - request_options_.get(), configurator_.get(), net_log_,
|
| - event_creator_.get()));
|
| + request_options_.get(), configurator_.get()));
|
| if (track_proxy_bypass_statistics)
|
| network_delegate->InitIODataAndUMA(this, bypass_stats_.get());
|
| return network_delegate;
|
| }
|
|
|
| +scoped_ptr<DataReductionProxyDelegate>
|
| +DataReductionProxyIOData::CreateProxyDelegate() const {
|
| + DCHECK(io_task_runner_->BelongsToCurrentThread());
|
| + return make_scoped_ptr(new DataReductionProxyDelegate(
|
| + request_options_.get(), config_.get(), configurator_.get(),
|
| + event_creator_.get(), bypass_stats_.get(), net_log_));
|
| +}
|
| +
|
| // TODO(kundaji): Rename this method to something more descriptive.
|
| // Bug http://crbug/488190.
|
| void DataReductionProxyIOData::SetProxyPrefs(bool enabled, bool at_startup) {
|
| DCHECK(io_task_runner_->BelongsToCurrentThread());
|
| DCHECK(url_request_context_getter_->GetURLRequestContext()->proxy_service());
|
| enabled_ = enabled;
|
| config_->SetProxyConfig(enabled, at_startup);
|
| if (config_client_) {
|
| config_client_->SetEnabled(enabled);
|
| if (enabled)
|
|
|