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

Unified Diff: chrome/test/base/testing_pref_service.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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/test/base/testing_pref_service.cc
diff --git a/chrome/test/base/testing_pref_service.cc b/chrome/test/base/testing_pref_service.cc
index ce15d0904be1ce0ca80cce2534b4a3bb31fd0df5..16ecc720a817e9689d1e41243629491c07815b2c 100644
--- a/chrome/test/base/testing_pref_service.cc
+++ b/chrome/test/base/testing_pref_service.cc
@@ -5,9 +5,11 @@
#include "chrome/test/base/testing_pref_service.h"
#include "base/bind.h"
+#include "base/compiler_specific.h"
#include "base/prefs/default_pref_store.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/pref_notifier_impl.h"
+#include "chrome/browser/prefs/pref_registrar_simple.h"
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/test/base/testing_browser_process.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,25 +23,25 @@ void HandleReadError(PersistentPrefStore::PrefReadError error) {
} // namespace
template<>
-TestingPrefServiceBase<PrefServiceSimple>::TestingPrefServiceBase(
+TestingPrefServiceBase<PrefService>::TestingPrefServiceBase(
TestingPrefStore* managed_prefs,
TestingPrefStore* user_prefs,
TestingPrefStore* recommended_prefs,
DefaultPrefStore* default_store,
PrefNotifierImpl* pref_notifier)
- : PrefServiceSimple(pref_notifier,
- new PrefValueStore(
- managed_prefs,
- NULL,
- NULL,
- user_prefs,
- recommended_prefs,
- default_store,
- pref_notifier),
- user_prefs,
- default_store,
- base::Bind(&HandleReadError),
- false),
+ : PrefService(pref_notifier,
+ new PrefValueStore(
+ managed_prefs,
+ NULL,
+ NULL,
+ user_prefs,
+ recommended_prefs,
+ default_store,
+ pref_notifier),
+ user_prefs,
+ default_store,
+ base::Bind(&HandleReadError),
+ false),
managed_prefs_(managed_prefs),
user_prefs_(user_prefs),
recommended_prefs_(recommended_prefs) {
@@ -71,11 +73,12 @@ TestingPrefServiceBase<PrefServiceSyncable>::TestingPrefServiceBase(
}
TestingPrefServiceSimple::TestingPrefServiceSimple()
- : TestingPrefServiceBase<PrefServiceSimple>(new TestingPrefStore(),
- new TestingPrefStore(),
- new TestingPrefStore(),
- new DefaultPrefStore(),
- new PrefNotifierImpl()) {
+ : TestingPrefServiceBase<PrefService>(new TestingPrefStore(),
+ new TestingPrefStore(),
+ new TestingPrefStore(),
+ new DefaultPrefStore(),
+ new PrefNotifierImpl()),
+ ALLOW_THIS_IN_INITIALIZER_LIST(registrar_(this)) {
}
TestingPrefServiceSimple::~TestingPrefServiceSimple() {

Powered by Google App Engine
This is Rietveld 408576698