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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.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_settings_unittest_android.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
index d60ba1d453f58e657aa885774cd00c2e39fcfdb7..6b26f55c63a73a4979d9a9f0de1df25f7b393081 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
@@ -10,6 +10,7 @@
#include "base/base64.h"
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
+#include "base/test/test_simple_task_runner.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/common/chrome_switches.h"
@@ -76,7 +77,13 @@ void data_reduction_proxy::DataReductionProxySettingsTestBase::ResetSettings(
EXPECT_CALL(*settings, GetURLFetcherForAvailabilityCheck()).Times(0);
EXPECT_CALL(*settings, LogProxyState(_, _, _)).Times(0);
settings_.reset(settings);
- settings_->SetDataReductionProxyStatisticsPrefs(statistics_prefs_.get());
+ settings_->SetDataReductionProxyStatisticsPrefs(
+ scoped_ptr<DataReductionProxyStatisticsPrefs>(
+ new DataReductionProxyStatisticsPrefs(
+ &pref_service_,
+ scoped_refptr<base::TestSimpleTaskRunner>(
+ new base::TestSimpleTaskRunner()),
+ base::TimeDelta())));
bengr 2015/02/03 23:51:17 #include "base/memory/ref_counted.h" #include "bas
megjablon 2015/02/04 18:47:54 Done.
}
template <class C>

Powered by Google App Engine
This is Rietveld 408576698