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

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: Fix double registration in Chrome Frame test. 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 | « chrome/test/base/testing_browser_process.cc ('k') | chrome/test/base/testing_pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fd726018813b86858bc1b44af76768ed4ec09ec0 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,20 @@ 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 for registering preferences on
+ // an existing TestingPrefServiceSimple instance. On a production
+ // PrefService 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 +125,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 +137,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>
« no previous file with comments | « chrome/test/base/testing_browser_process.cc ('k') | chrome/test/base/testing_pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698