Index: base/prefs/public/pref_member_unittest.cc |
diff --git a/base/prefs/public/pref_member_unittest.cc b/base/prefs/public/pref_member_unittest.cc |
index 3439c0f04fc37e56a5b8acaf08f6e6c24642cb9a..fb81f3978407f8961e57ffa5c8ec57809d8c2108 100644 |
--- a/base/prefs/public/pref_member_unittest.cc |
+++ b/base/prefs/public/pref_member_unittest.cc |
@@ -8,6 +8,7 @@ |
#include "base/message_loop.h" |
#include "base/synchronization/waitable_event.h" |
#include "base/threading/thread.h" |
+#include "chrome/browser/prefs/pref_registry_simple.h" |
#include "chrome/test/base/testing_pref_service.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -19,12 +20,12 @@ const char kDoublePref[] = "double"; |
const char kStringPref[] = "string"; |
const char kStringListPref[] = "string_list"; |
-void RegisterTestPrefs(PrefServiceSimple* prefs) { |
- prefs->RegisterBooleanPref(kBoolPref, false); |
- prefs->RegisterIntegerPref(kIntPref, 0); |
- prefs->RegisterDoublePref(kDoublePref, 0.0); |
- prefs->RegisterStringPref(kStringPref, "default"); |
- prefs->RegisterListPref(kStringListPref, new ListValue()); |
+void RegisterTestPrefs(PrefRegistrySimple* registry) { |
+ registry->RegisterBooleanPref(kBoolPref, false); |
+ registry->RegisterIntegerPref(kIntPref, 0); |
+ registry->RegisterDoublePref(kDoublePref, 0.0); |
+ registry->RegisterStringPref(kStringPref, "default"); |
+ registry->RegisterListPref(kStringListPref, new ListValue()); |
} |
class GetPrefValueHelper |
@@ -101,7 +102,7 @@ class PrefMemberTestClass { |
TEST(PrefMemberTest, BasicGetAndSet) { |
TestingPrefServiceSimple prefs; |
- RegisterTestPrefs(&prefs); |
+ RegisterTestPrefs(prefs.registry()); |
// Test bool |
BooleanPrefMember boolean; |
@@ -247,7 +248,7 @@ TEST(PrefMemberTest, InvalidList) { |
TEST(PrefMemberTest, TwoPrefs) { |
// Make sure two DoublePrefMembers stay in sync. |
TestingPrefServiceSimple prefs; |
- RegisterTestPrefs(&prefs); |
+ RegisterTestPrefs(prefs.registry()); |
DoublePrefMember pref1; |
pref1.Init(kDoublePref, &prefs); |
@@ -267,7 +268,7 @@ TEST(PrefMemberTest, TwoPrefs) { |
TEST(PrefMemberTest, Observer) { |
TestingPrefServiceSimple prefs; |
- RegisterTestPrefs(&prefs); |
+ RegisterTestPrefs(prefs.registry()); |
PrefMemberTestClass test_obj(&prefs); |
EXPECT_EQ("default", *test_obj.str_); |
@@ -300,7 +301,7 @@ TEST(PrefMemberTest, NoInit) { |
TEST(PrefMemberTest, MoveToThread) { |
TestingPrefServiceSimple prefs; |
scoped_refptr<GetPrefValueHelper> helper(new GetPrefValueHelper()); |
- RegisterTestPrefs(&prefs); |
+ RegisterTestPrefs(prefs.registry()); |
helper->Init(kBoolPref, &prefs); |
helper->FetchValue(); |