Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 122313a012f38d8e4a321c61e3faa8acf421accf..e4fd38071c35e4018becdbbadfda351c8eb89a8a 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -81,6 +81,7 @@ |
#include "chrome/common/url_constants.h" |
#include "chrome/grit/chromium_strings.h" |
#include "components/bookmarks/browser/bookmark_model.h" |
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_statistics_prefs.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" |
@@ -119,6 +120,7 @@ |
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h" |
#include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h" |
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_statistics_prefs.h" |
#endif |
#if defined(ENABLE_CONFIGURATION_POLICY) |
@@ -661,6 +663,8 @@ void ProfileImpl::DoFinalInit() { |
scoped_ptr<data_reduction_proxy::DataReductionProxyParams> |
data_reduction_proxy_params; |
scoped_ptr<DataReductionProxyChromeConfigurator> chrome_configurator; |
+ scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> |
+ data_reduction_proxy_statistics_prefs; |
#if defined(SPDY_PROXY_AUTH_ORIGIN) |
DataReductionProxyChromeSettings* data_reduction_proxy_chrome_settings = |
DataReductionProxyChromeSettingsFactory::GetForBrowserContext(this); |
@@ -682,6 +686,20 @@ void ProfileImpl::DoFinalInit() { |
// settings after ownership is passed. |
DataReductionProxyChromeConfigurator* |
data_reduction_proxy_chrome_configurator = chrome_configurator.get(); |
+#if defined(OS_ANDROID) || defined(OS_IOS) |
bengr
2014/08/27 04:53:24
Add a comment explaining the platform specializati
megjablon
2014/08/28 20:44:06
Done.
|
+ base::TimeDelta commit_delay = base::TimeDelta(); |
+#else |
+ base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60) |
+#endif |
+ data_reduction_proxy_statistics_prefs = |
+ scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>( |
+ new data_reduction_proxy::DataReductionProxyStatisticsPrefs( |
+ g_browser_process->local_state(), |
+ base::MessageLoopProxy::current(), |
+ commit_delay)); |
+ data_reduction_proxy_statistics_prefs->Init(); |
+ data_reduction_proxy_chrome_settings->SetDataReductionProxyStatisticsPrefs( |
+ data_reduction_proxy_statistics_prefs.get()); |
#endif |
// Make sure we initialize the ProfileIOData after everything else has been |
@@ -694,7 +712,8 @@ void ProfileImpl::DoFinalInit() { |
CreateDomainReliabilityMonitor(local_state), |
data_reduction_proxy_unavailable, |
chrome_configurator.Pass(), |
- data_reduction_proxy_params.Pass()); |
+ data_reduction_proxy_params.Pass(), |
+ data_reduction_proxy_statistics_prefs.Pass()); |
#if defined(SPDY_PROXY_AUTH_ORIGIN) |
data_reduction_proxy_chrome_settings->InitDataReductionProxySettings( |