Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl_io_data.cc |
| diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc |
| index 04dbdf2f08675a2589d2f0052cfc43b596f92186..ec5b70e7ccec03cef81d48a9e2344e9b2e7ce9b7 100644 |
| --- a/chrome/browser/profiles/profile_impl_io_data.cc |
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc |
| @@ -37,6 +37,7 @@ |
| #include "chrome/common/url_constants.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth_request_handler.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h" |
| +#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h" |
| @@ -414,8 +415,9 @@ ProfileImplIOData::ProfileImplIOData() |
| } |
| ProfileImplIOData::~ProfileImplIOData() { |
| - if (initialized()) |
| - network_delegate()->set_domain_reliability_monitor(NULL); |
| + if (initialized()) { |
| + chrome_network_delegate()->set_domain_reliability_monitor(NULL); |
| + } |
|
bengr
2014/12/02 17:20:00
Remove curly braces.
megjablon
2014/12/02 22:33:21
Done.
|
| DestroyResourceContext(); |
| @@ -447,23 +449,18 @@ void ProfileImplIOData::InitializeInternal( |
| data_reduction_proxy_usage_stats()->set_unavailable_callback( |
| data_reduction_proxy_unavailable_callback()); |
| - network_delegate()->set_data_reduction_proxy_enabled_pref( |
| - &data_reduction_proxy_enabled_); |
| - network_delegate()->set_data_reduction_proxy_params( |
| - data_reduction_proxy_params()); |
| - network_delegate()->set_data_reduction_proxy_usage_stats( |
| - data_reduction_proxy_usage_stats()); |
| - network_delegate()->set_data_reduction_proxy_auth_request_handler( |
| - data_reduction_proxy_auth_request_handler()); |
| - network_delegate()->set_data_reduction_proxy_statistics_prefs( |
| - data_reduction_proxy_statistics_prefs()); |
| - network_delegate()->set_on_resolve_proxy_handler( |
| - base::Bind(data_reduction_proxy::OnResolveProxyHandler)); |
| - network_delegate()->set_proxy_config_getter( |
| + network_delegate()->Init( |
|
bengr
2014/12/02 17:20:00
Try to tighten this up. I think these parameters s
megjablon
2014/12/02 22:33:21
I have moved everything to the constructor and got
|
| + NULL, NULL, |
| + &data_reduction_proxy_enabled_, |
| + data_reduction_proxy_params(), |
| + data_reduction_proxy_usage_stats(), |
| + data_reduction_proxy_auth_request_handler(), |
| + data_reduction_proxy_statistics_prefs(), |
| + base::Bind(data_reduction_proxy::OnResolveProxyHandler), |
| base::Bind( |
| &DataReductionProxyChromeConfigurator::GetProxyConfigOnIOThread, |
| base::Unretained(data_reduction_proxy_chrome_configurator()))); |
| - network_delegate()->set_predictor(predictor_.get()); |
| + chrome_network_delegate()->set_predictor(predictor_.get()); |
| // Initialize context members. |
| @@ -611,7 +608,7 @@ void ProfileImplIOData::InitializeInternal( |
| monitor->InitURLRequestContext(main_context); |
| monitor->AddBakedInConfigs(); |
| monitor->SetDiscardUploads(!GetMetricsEnabledStateOnIOThread()); |
| - network_delegate()->set_domain_reliability_monitor(monitor); |
| + chrome_network_delegate()->set_domain_reliability_monitor(monitor); |
| } |
| lazy_params_.reset(); |