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

Unified Diff: base/prefs/public/pref_service_base.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 | « base/prefs/public/pref_member_unittest.cc ('k') | chrome/browser/about_flags_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/public/pref_service_base.h
diff --git a/base/prefs/public/pref_service_base.h b/base/prefs/public/pref_service_base.h
index 504632b3afde84c68f0d31887fa31e954d2df989..4115fa4070389709ae40ce707b0733ed38c6f169 100644
--- a/base/prefs/public/pref_service_base.h
+++ b/base/prefs/public/pref_service_base.h
@@ -36,14 +36,6 @@ class PrefServiceBase {
virtual ~PrefServiceBase() {}
- // Enum used when registering preferences to determine if it should be synced
- // or not. This is only used for profile prefs, not local state prefs.
- // See the Register*Pref methods for profile prefs below.
- enum PrefSyncStatus {
- UNSYNCABLE_PREF,
- SYNCABLE_PREF
- };
-
// Interface to a single preference.
class Preference {
public:
@@ -112,90 +104,6 @@ class PrefServiceBase {
// value can be changed by the user.
virtual bool IsUserModifiablePreference(const char* pref_name) const = 0;
- // Make the PrefService aware of a pref.
- // TODO(zea): split local state and profile prefs into their own subclasses.
- // ---------- Local state prefs ----------
- virtual void RegisterBooleanPref(const char* path,
- bool default_value) = 0;
- virtual void RegisterIntegerPref(const char* path,
- int default_value) = 0;
- virtual void RegisterDoublePref(const char* path,
- double default_value) = 0;
- virtual void RegisterStringPref(const char* path,
- const std::string& default_value) = 0;
- virtual void RegisterFilePathPref(const char* path,
- const FilePath& default_value) = 0;
- virtual void RegisterListPref(const char* path) = 0;
- virtual void RegisterDictionaryPref(const char* path) = 0;
- // These take ownership of the default_value:
- virtual void RegisterListPref(const char* path,
- base::ListValue* default_value) = 0;
- virtual void RegisterDictionaryPref(
- const char* path, base::DictionaryValue* default_value) = 0;
- // These variants use a default value from the locale dll instead.
- virtual void RegisterLocalizedBooleanPref(
- const char* path, int locale_default_message_id) = 0;
- virtual void RegisterLocalizedIntegerPref(
- const char* path, int locale_default_message_id) = 0;
- virtual void RegisterLocalizedDoublePref(
- const char* path, int locale_default_message_id) = 0;
- virtual void RegisterLocalizedStringPref(
- const char* path, int locale_default_message_id) = 0;
- virtual void RegisterInt64Pref(const char* path,
- int64 default_value) = 0;
-
- // ---------- Profile prefs ----------
- // Profile prefs must specify whether the pref should be synchronized across
- // machines or not (see PrefSyncStatus enum above).
- virtual void RegisterBooleanPref(const char* path,
- bool default_value,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterIntegerPref(const char* path,
- int default_value,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterDoublePref(const char* path,
- double default_value,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterStringPref(const char* path,
- const std::string& default_value,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterFilePathPref(const char* path,
- const FilePath& default_value,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterListPref(const char* path,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterDictionaryPref(const char* path,
- PrefSyncStatus sync_status) = 0;
- // These take ownership of the default_value:
- virtual void RegisterListPref(const char* path,
- base::ListValue* default_value,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterDictionaryPref(const char* path,
- base::DictionaryValue* default_value,
- PrefSyncStatus sync_status) = 0;
- // These variants use a default value from the locale dll instead.
- virtual void RegisterLocalizedBooleanPref(
- const char* path,
- int locale_default_message_id,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterLocalizedIntegerPref(
- const char* path,
- int locale_default_message_id,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterLocalizedDoublePref(
- const char* path,
- int locale_default_message_id,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterLocalizedStringPref(
- const char* path,
- int locale_default_message_id,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterInt64Pref(const char* path,
- int64 default_value,
- PrefSyncStatus sync_status) = 0;
- virtual void RegisterUint64Pref(const char* path,
- uint64 default_value,
- PrefSyncStatus sync_status) = 0;
// Unregisters a preference.
virtual void UnregisterPreference(const char* path) = 0;
« no previous file with comments | « base/prefs/public/pref_member_unittest.cc ('k') | chrome/browser/about_flags_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698