Chromium Code Reviews| Index: chrome/browser/prefs/pref_service.h |
| diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h |
| index 2e0623bd0b8459b7f5fa5d5baad1b0aa8951bac7..927a4d91525cd1ee6e102c67ca29c5940d084170 100644 |
| --- a/chrome/browser/prefs/pref_service.h |
| +++ b/chrome/browser/prefs/pref_service.h |
| @@ -42,7 +42,8 @@ class PrefService : public NonThreadSafe { |
| // dictionary (a branch), or list. You shouldn't need to construct this on |
| // your own; use the PrefService::Register*Pref methods instead. |
| Preference(const PrefService* service, |
| - const char* name); |
| + const char* name, |
| + Value::ValueType type); |
|
Mattias Nissler (ping if slow)
2010/12/22 12:09:03
Can't we just ask the PrefService of the type?
battre
2010/12/22 18:34:53
Will leave this in the Preference as discussed off
|
| ~Preference() {} |
| // Returns the name of the Preference (i.e., the key, e.g., |
| @@ -92,6 +93,8 @@ class PrefService : public NonThreadSafe { |
| std::string name_; |
| + Value::ValueType type_; |
| + |
| // Reference to the PrefService in which this pref was created. |
| const PrefService* pref_service_; |
| @@ -109,6 +112,12 @@ class PrefService : public NonThreadSafe { |
| PrefStore* extension_pref_store, |
| Profile* profile); |
| + // Creates an incognito copy of the pref service that shares most pref stores |
| + // but uses a fresh non-persistent overlay for the user pref store and an |
| + // individual extension pref store (to cache the effective extension prefs for |
| + // incognito windows). |
| + PrefService* CreateIncognitoPrefService(PrefStore* incognito_extension_prefs); |
| + |
| virtual ~PrefService(); |
| // Reloads the data from file. This should only be called when the importer |
| @@ -231,7 +240,9 @@ class PrefService : public NonThreadSafe { |
| PrefStore* command_line_prefs, |
| PersistentPrefStore* user_prefs, |
| PrefStore* recommended_prefs, |
| - Profile* profile); |
| + DefaultPrefStore* default_store, |
| + Profile* profile, |
| + bool init_from_storage); |
| // The PrefNotifier handles registering and notifying preference observers. |
| // It is created and owned by this PrefService. Subclasses may access it for |
| @@ -273,14 +284,20 @@ class PrefService : public NonThreadSafe { |
| // and owned by this PrefService. Subclasses may access it for unit testing. |
| scoped_refptr<PrefValueStore> pref_value_store_; |
| - // The persistent pref store used for actual user data. |
| - PersistentPrefStore* user_pref_store_; |
| - |
| - // Points to the default pref store we passed to the PrefValueStore. |
| - DefaultPrefStore* default_store_; |
| - |
| - // A set of all the registered Preference objects. |
| - PreferenceSet prefs_; |
| + // Pref Stores and profile that we passed to the PrefValueStore. |
| + scoped_refptr<PrefStore> managed_platform_prefs_; |
| + scoped_refptr<PrefStore> device_management_prefs_; |
| + scoped_refptr<PrefStore> extension_prefs_; |
| + scoped_refptr<PrefStore> command_line_prefs_; |
| + scoped_refptr<PrefStore> recommended_prefs_; |
| + scoped_refptr<PersistentPrefStore> user_pref_store_; |
| + scoped_refptr<DefaultPrefStore> default_store_; |
| + Profile* profile_; |
| + |
| + // Local cache of registered Preference objects. The default_store_ |
| + // is authoritative with respect to what the types and default values |
| + // of registered preferences are. |
| + mutable PreferenceSet prefs_; |
| DISALLOW_COPY_AND_ASSIGN(PrefService); |
| }; |