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

Unified Diff: chrome/browser/metrics/variations/variations_service_unittest.cc

Issue 739173002: Remove dependencies of ResourceRequestAllowedNotifier on chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and cleanup Created 6 years, 1 month 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/metrics/variations/variations_service_unittest.cc
diff --git a/chrome/browser/metrics/variations/variations_service_unittest.cc b/chrome/browser/metrics/variations/variations_service_unittest.cc
index 55bdd68f58936fe16830d51cb70b74b0ce3a3832..b1b4ac347b65699cfae3694b95a4ae37f51aa745 100644
--- a/chrome/browser/metrics/variations/variations_service_unittest.cc
+++ b/chrome/browser/metrics/variations/variations_service_unittest.cc
@@ -266,7 +266,8 @@ TEST_F(VariationsServiceTest, RequestsInitiallyNotAllowed) {
// Pass ownership to TestVariationsService, but keep a weak pointer to
// manipulate it for this test.
- TestRequestAllowedNotifier* test_notifier = new TestRequestAllowedNotifier;
+ TestRequestAllowedNotifier* test_notifier =
+ new TestRequestAllowedNotifier(&prefs);
TestVariationsService test_service(test_notifier, &prefs);
// Force the notifier to initially disallow requests.
@@ -287,7 +288,8 @@ TEST_F(VariationsServiceTest, RequestsInitiallyAllowed) {
// Pass ownership to TestVariationsService, but keep a weak pointer to
// manipulate it for this test.
- TestRequestAllowedNotifier* test_notifier = new TestRequestAllowedNotifier;
+ TestRequestAllowedNotifier* test_notifier =
+ new TestRequestAllowedNotifier(&prefs);
TestVariationsService test_service(test_notifier, &prefs);
test_notifier->SetRequestsAllowedOverride(true);
@@ -302,7 +304,7 @@ TEST_F(VariationsServiceTest, SeedStoredWhenOKStatus) {
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
- TestVariationsService service(new TestRequestAllowedNotifier, &prefs);
+ TestVariationsService service(new TestRequestAllowedNotifier(&prefs), &prefs);
const GURL url = VariationsService::GetVariationsServerURL(&prefs);
service.variations_server_url_ = url;
service.set_intercepts_fetch(false);
@@ -334,7 +336,8 @@ TEST_F(VariationsServiceTest, SeedNotStoredWhenNonOKStatus) {
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
- VariationsService service(new TestRequestAllowedNotifier, &prefs, NULL);
+ VariationsService service(new TestRequestAllowedNotifier(&prefs), &prefs,
+ NULL);
const GURL url = VariationsService::GetVariationsServerURL(&prefs);
service.variations_server_url_ = url;
for (size_t i = 0; i < arraysize(non_ok_status_codes); ++i) {
@@ -358,7 +361,8 @@ TEST_F(VariationsServiceTest, SeedDateUpdatedOn304Status) {
VariationsService::RegisterPrefs(prefs.registry());
net::TestURLFetcherFactory factory;
- VariationsService service(new TestRequestAllowedNotifier, &prefs, NULL);
+ VariationsService service(new TestRequestAllowedNotifier(&prefs), &prefs,
+ NULL);
const GURL url = VariationsService::GetVariationsServerURL(&prefs);
service.variations_server_url_ = url;
service.DoActualFetch();
@@ -375,7 +379,8 @@ TEST_F(VariationsServiceTest, SeedDateUpdatedOn304Status) {
TEST_F(VariationsServiceTest, Observer) {
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
- VariationsService service(new TestRequestAllowedNotifier, &prefs, NULL);
+ VariationsService service(new TestRequestAllowedNotifier(&prefs), &prefs,
+ NULL);
struct {
int normal_count;
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | chrome/browser/translate/translate_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698