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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Fix Clang build and fix bug shown by trybots. Created 7 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/test/base/testing_pref_service.h
diff --git a/chrome/test/base/testing_pref_service.h b/chrome/test/base/testing_pref_service.h
index 5c921bfd4319e5a8a840569fb78b708486ecd62f..9330cfb7bce6d347b1b859a78eb8cab8ff8e24ca 100644
--- a/chrome/test/base/testing_pref_service.h
+++ b/chrome/test/base/testing_pref_service.h
@@ -6,12 +6,14 @@
#define CHROME_TEST_BASE_TESTING_PREF_SERVICE_H_
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/prefs/testing_pref_store.h"
+#include "chrome/browser/prefs/pref_registry.h"
#include "chrome/browser/prefs/pref_service.h"
-class DefaultPrefStore;
class PrefModelAssociator;
class PrefNotifierImpl;
+class PrefRegistrySimple;
class TestingBrowserProcess;
class TestingPrefStore;
@@ -53,7 +55,7 @@ class TestingPrefServiceBase : public SuperPrefService {
TestingPrefStore* managed_prefs,
TestingPrefStore* user_prefs,
TestingPrefStore* recommended_prefs,
- DefaultPrefStore* default_store,
+ PrefRegistry* pref_registry,
PrefNotifierImpl* pref_notifier);
private:
@@ -75,13 +77,19 @@ class TestingPrefServiceBase : public SuperPrefService {
DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceBase);
};
-// Test version of PrefServiceSimple.
+// Test version of PrefService.
class TestingPrefServiceSimple
- : public TestingPrefServiceBase<PrefServiceSimple> {
+ : public TestingPrefServiceBase<PrefService> {
public:
TestingPrefServiceSimple();
virtual ~TestingPrefServiceSimple();
+ // This is provided as a convenience; on a production PrefService
Mattias Nissler (ping if slow) 2013/01/31 14:50:45 maybe elaborate: "as a convenience for registering
Jói 2013/01/31 16:23:37 Done.
+ // you would do all registrations before constructing it, passing it
+ // a PrefRegistry via its constructor (or via
+ // e.g. PrefServiceBuilder).
+ PrefRegistrySimple* registry();
+
private:
DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSimple);
};
@@ -116,11 +124,11 @@ class ScopedTestingLocalState {
};
template<>
-TestingPrefServiceBase<PrefServiceSimple>::TestingPrefServiceBase(
+TestingPrefServiceBase<PrefService>::TestingPrefServiceBase(
TestingPrefStore* managed_prefs,
TestingPrefStore* user_prefs,
TestingPrefStore* recommended_prefs,
- DefaultPrefStore* default_store,
+ PrefRegistry* pref_registry,
PrefNotifierImpl* pref_notifier);
template<>
@@ -128,7 +136,7 @@ TestingPrefServiceBase<PrefServiceSyncable>::TestingPrefServiceBase(
TestingPrefStore* managed_prefs,
TestingPrefStore* user_prefs,
TestingPrefStore* recommended_prefs,
- DefaultPrefStore* default_store,
+ PrefRegistry* pref_registry,
PrefNotifierImpl* pref_notifier);
template<class SuperPrefService>

Powered by Google App Engine
This is Rietveld 408576698