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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc

Issue 12211026: Avoid creating new TestingPrefServiceSyncable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index 5db5eca28059fcb1ecff4eeaa024a840b91c8e82..3b38f5ae006f268ee5c715c177396452eacfa37d 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -13,7 +13,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/custom_handlers/protocol_handler.h"
#include "chrome/test/base/testing_browser_process.h"
-#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -326,9 +325,6 @@ class ProtocolHandlerRegistryTest : public testing::Test {
FakeDelegate* delegate() const { return delegate_; }
ProtocolHandlerRegistry* registry() { return registry_.get(); }
TestingProfile* profile() const { return profile_.get(); }
- // TODO(joi): Check if this can be removed, as well as the call to
- // SetPrefService in SetUp.
- PrefServiceSyncable* pref_service() const { return profile_->GetPrefs(); }
const ProtocolHandler& test_protocol_handler() const {
return test_protocol_handler_;
}
@@ -367,14 +363,10 @@ class ProtocolHandlerRegistryTest : public testing::Test {
virtual void SetUp() {
profile_.reset(new TestingProfile());
- profile_->SetPrefService(new TestingPrefServiceSyncable());
+ CHECK(profile_->GetPrefs());
SetUpRegistry(true);
test_protocol_handler_ =
CreateProtocolHandler("test", GURL("http://test.com/%s"), "Test");
-
- // TODO(joi): If pref_service() and the SetPrefService above go,
- // then this could go.
- ProtocolHandlerRegistry::RegisterUserPrefs(pref_service());
}
virtual void TearDown() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698