Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2649)

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc

Issue 888713002: DataReductionProxyStatisticsPrefs should support WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
index 81b669fffebeea116ca08b0e936ce33aed14f864..f4f94e865684d532869b2c600302c8ea555c3e96 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
@@ -32,35 +32,15 @@ CreateDataReductionProxyChromeIOData(
DataReductionProxyChromeSettingsFactory::GetForBrowserContext(
browser_context);
-#if defined(OS_ANDROID) || defined(OS_IOS)
- // On mobile we write data reduction proxy prefs directly to the pref service.
- // On desktop we store data reduction proxy prefs in memory, writing to disk
- // every 60 minutes and on termination. Shutdown hooks must be added for
- // Android and iOS in order for non-zero delays to be supported.
- // (http://crbug.com/408264)
- base::TimeDelta commit_delay = base::TimeDelta();
-#else
- base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60);
-#endif
-
- data_reduction_proxy::DataReductionProxyStatisticsPrefs*
- data_reduction_proxy_statistics_prefs =
- new data_reduction_proxy::DataReductionProxyStatisticsPrefs(
- prefs, ui_task_runner,
- commit_delay);
-
scoped_ptr<data_reduction_proxy::DataReductionProxyIOData>
data_reduction_proxy_io_data(
new data_reduction_proxy::DataReductionProxyIOData(
DataReductionProxyChromeSettings::GetClient(),
- make_scoped_ptr(data_reduction_proxy_statistics_prefs),
settings,
net_log,
io_task_runner,
ui_task_runner));
data_reduction_proxy_io_data->InitOnUIThread(prefs);
- settings->SetDataReductionProxyStatisticsPrefs(
- data_reduction_proxy_statistics_prefs);
return data_reduction_proxy_io_data.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698