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

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: DRPSettings owns DRPStatisticsPrefs Created 5 years, 11 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..4519c4c1ea390ccb89aee3ac7160fa807cbb7d8c 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
@@ -43,24 +43,21 @@ CreateDataReductionProxyChromeIOData(
base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60);
#endif
- data_reduction_proxy::DataReductionProxyStatisticsPrefs*
- data_reduction_proxy_statistics_prefs =
+ settings->SetDataReductionProxyStatisticsPrefs(
+ scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>(
bengr 2015/02/03 23:51:17 #include "base/memory/scoped_ptr.h" #include "comp
megjablon 2015/02/04 18:47:53 scoped_ptr is included in the .h and statistics_pr
new data_reduction_proxy::DataReductionProxyStatisticsPrefs(
prefs, ui_task_runner,
- commit_delay);
+ 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