Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index bd6fa639f1b53acd868d2e6f67858967bb050fc0..53c61ca763c485bead6bb50f29d1d3ba19776bcb 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -78,6 +78,7 @@ |
| #include "chrome/common/pref_names.h" |
| #include "chrome/common/url_constants.h" |
| #include "components/bookmarks/browser/bookmark_model.h" |
| +#include "components/data_reduction_proxy/browser/data_reduction_proxy_delayed_pref_service.h" |
| #include "components/dom_distiller/content/dom_distiller_viewer_source.h" |
| #include "components/dom_distiller/core/url_constants.h" |
| #include "components/domain_reliability/monitor.h" |
| @@ -632,6 +633,8 @@ void ProfileImpl::DoFinalInit() { |
| base::Callback<void(bool)> data_reduction_proxy_unavailable; |
| scoped_ptr<data_reduction_proxy::DataReductionProxyParams> |
| data_reduction_proxy_params; |
| + scoped_ptr<data_reduction_proxy::DataReductionProxyDelayedPrefService> |
| + data_reduction_proxy_delayed_pref_service; |
| #if defined(SPDY_PROXY_AUTH_ORIGIN) |
| DataReductionProxyChromeSettings* data_reduction_proxy_chrome_settings = |
| DataReductionProxyChromeSettingsFactory::GetForBrowserContext(this); |
| @@ -641,6 +644,23 @@ void ProfileImpl::DoFinalInit() { |
| base::Bind( |
| &data_reduction_proxy::DataReductionProxySettings::SetUnreachable, |
| base::Unretained(data_reduction_proxy_chrome_settings)); |
| +#if defined(OS_ANDROID) || defined(OS_IOS) |
|
bengr
2014/08/14 17:39:41
Rewrite as:
#if defined(OS_ANDROID) || defined(OS_
megjablon
2014/08/26 19:28:40
Done.
|
| + data_reduction_proxy_delayed_pref_service = |
| + scoped_ptr<data_reduction_proxy::DataReductionProxyDelayedPrefService>( |
| + new data_reduction_proxy::DataReductionProxyDelayedPrefService( |
| + g_browser_process->local_state(), |
| + base::MessageLoopProxy::current(), |
| + base::TimeDelta())); |
| +#else |
| + data_reduction_proxy_delayed_pref_service = |
| + scoped_ptr<data_reduction_proxy::DataReductionProxyDelayedPrefService>( |
| + new data_reduction_proxy::DataReductionProxyDelayedPrefService( |
| + g_browser_process->local_state(), |
| + base::MessageLoopProxy::current(), |
| + base::TimeDelta::FromMinutes(60))); |
| +#endif |
| + data_reduction_proxy_chrome_settings->SetDataReductionProxyDelayedPrefService( |
| + data_reduction_proxy_delayed_pref_service->AsWeakPtr()); |
| #endif |
| // Make sure we initialize the ProfileIOData after everything else has been |
| @@ -652,7 +672,8 @@ void ProfileImpl::DoFinalInit() { |
| predictor_, session_cookie_mode, GetSpecialStoragePolicy(), |
| CreateDomainReliabilityMonitor(), |
| data_reduction_proxy_unavailable, |
| - data_reduction_proxy_params.Pass()); |
| + data_reduction_proxy_params.Pass(), |
| + data_reduction_proxy_delayed_pref_service.Pass()); |
| #if defined(SPDY_PROXY_AUTH_ORIGIN) |
| scoped_ptr<data_reduction_proxy::DataReductionProxyConfigurator> |