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

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

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to PrefRegistrySyncable and PrefServiceSyncable to let sync know of pre-registered prefs. 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
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 fd726018813b86858bc1b44af76768ed4ec09ec0..28856d734226c2bbdc17351236b8affbb3ed927e 100644
--- a/chrome/test/base/testing_pref_service.h
+++ b/chrome/test/base/testing_pref_service.h
@@ -10,10 +10,12 @@
#include "base/prefs/testing_pref_store.h"
#include "chrome/browser/prefs/pref_registry.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/prefs/pref_service_syncable.h"
class PrefModelAssociator;
class PrefNotifierImpl;
class PrefRegistrySimple;
+class PrefRegistrySyncable;
class TestingBrowserProcess;
class TestingPrefStore;
@@ -102,6 +104,12 @@ class TestingPrefServiceSyncable
TestingPrefServiceSyncable();
virtual ~TestingPrefServiceSyncable();
+ // This is provided as a convenience; on a production PrefService
+ // you would do all registrations before constructing it, passing it
+ // a PrefRegistry via its constructor (or via
+ // e.g. PrefServiceBuilder).
+ PrefRegistrySyncable* registry();
+
private:
DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSyncable);
};

Powered by Google App Engine
This is Rietveld 408576698