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 fb22c3c34299d8f1b98dd4b5709c3378ce1f9664..3800cb5cbecd80eaadb9cb12f3565ff02b23745c 100644 |
| --- a/chrome/browser/profiles/profile_impl_io_data.cc |
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc |
| @@ -34,6 +34,7 @@ |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/pref_names.h" |
| #include "chrome/common/url_constants.h" |
| +#include "components/data_reduction_proxy/content/data_reduction_proxy_ui_service.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_protocol.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h" |
| @@ -139,7 +140,9 @@ void ProfileImplIOData::Handle::Init( |
| scoped_ptr<data_reduction_proxy::DataReductionProxyParams> |
| data_reduction_proxy_params, |
| scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> |
| - data_reduction_proxy_statistics_prefs) { |
| + data_reduction_proxy_statistics_prefs, |
| + scoped_ptr<data_reduction_proxy::DataReductionProxyUIService> |
|
bengr
2014/10/31 17:06:47
Hmm. This UI service won't be available on iOS. I'
|
| + data_reduction_proxy_ui_service) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| DCHECK(!io_data_->lazy_params_); |
| DCHECK(predictor); |
| @@ -179,6 +182,8 @@ void ProfileImplIOData::Handle::Init( |
| io_data_->set_data_reduction_proxy_params(data_reduction_proxy_params.Pass()); |
| io_data_->set_data_reduction_proxy_statistics_prefs( |
| data_reduction_proxy_statistics_prefs.Pass()); |
| + io_data_->set_data_reduction_proxy_ui_service( |
|
bengr
2014/10/31 17:06:47
Now would be a good time to write a DataReductionP
megjablon
2014/12/11 23:32:04
Done.
|
| + data_reduction_proxy_ui_service.Pass()); |
| } |
| content::ResourceContext* |
| @@ -439,6 +444,12 @@ void ProfileImplIOData::InitializeInternal( |
| .get()))); |
| data_reduction_proxy_usage_stats()->set_unavailable_callback( |
| data_reduction_proxy_unavailable_callback()); |
| +#if defined(OS_ANDROID) |
|
bengr
2014/10/31 17:06:47
Can you do this if the ui_service() is not NULL in
megjablon
2014/12/11 23:32:04
Done.
|
| + data_reduction_proxy_ui_service()->set_proxy_config_getter( |
| + base::Bind( |
| + &DataReductionProxyChromeConfigurator::GetProxyConfigOnIO, |
| + base::Unretained(data_reduction_proxy_chrome_configurator()))); |
| +#endif |
| network_delegate()->set_data_reduction_proxy_enabled_pref( |
| &data_reduction_proxy_enabled_); |