Chromium Code Reviews| Index: chrome/browser/prefs/pref_value_store.h |
| diff --git a/chrome/browser/prefs/pref_value_store.h b/chrome/browser/prefs/pref_value_store.h |
| index 87ed7b26b635cbfb6517d0b6d316a3d22c395e49..d52e02f0419627f1580cf3b4a14371111893d5e1 100644 |
| --- a/chrome/browser/prefs/pref_value_store.h |
| +++ b/chrome/browser/prefs/pref_value_store.h |
| @@ -172,7 +172,7 @@ class PrefValueStore : public base::RefCountedThreadSafe<PrefValueStore> { |
| // that conflict with proxy settings specified by proxy policy. |
| bool HasPolicyConflictingUserProxySettings(); |
| - protected: |
| + protected: |
| // In decreasing order of precedence: |
| // |managed_platform_prefs| contains all managed platform (non-cloud policy) |
| // preference values. |
| @@ -186,6 +186,13 @@ class PrefValueStore : public base::RefCountedThreadSafe<PrefValueStore> { |
| // |default_prefs| contains application-default preference values. It must |
| // be non-null if any preferences are to be registered. |
| // |
| + // The |profile| parameter is used to construct a replacement device |
| + // management pref store in case of policy refresh. |
|
Nico
2010/11/18 14:34:24
get rid of the newline above this, and make the fo
Mattias Nissler (ping if slow)
2010/11/18 15:08:16
I disagree, the above comment talks about the pref
|
| + // |
| + // TODO(mnissler, danno): Refactor the pref store interface and refresh logic |
| + // so refreshes can be handled by the pref store itself and the profile |
| + // parameter be removed her. |
|
Nico
2010/11/18 14:34:24
can be removed here
Mattias Nissler (ping if slow)
2010/11/18 15:08:16
Done.
|
| + // |
| // This constructor should only be used internally, or by subclasses in |
| // testing. The usual way to create a PrefValueStore is by creating a |
| // PrefService. |
| @@ -195,19 +202,16 @@ class PrefValueStore : public base::RefCountedThreadSafe<PrefValueStore> { |
| PrefStore* command_line_prefs, |
| PrefStore* user_prefs, |
| PrefStore* recommended_prefs, |
| - PrefStore* default_prefs); |
| + PrefStore* default_prefs, |
| + Profile* profile); |
| private: |
| + typedef std::map<std::string, Value::ValueType> PrefTypeMap; |
| + |
| friend class PrefValueStoreTest; |
| FRIEND_TEST_ALL_PREFIXES(PrefValueStoreTest, |
| TestRefreshPolicyPrefsCompletion); |
| - scoped_ptr<PrefStore> pref_stores_[PrefNotifier::PREF_STORE_TYPE_MAX + 1]; |
| - |
| - // A mapping of preference names to their registered types. |
| - typedef std::map<std::string, Value::ValueType> PrefTypeMap; |
| - PrefTypeMap pref_types_; |
| - |
| // Returns true if the preference with the given name has a value in the |
| // given PrefStoreType, of the same value type as the preference was |
| // registered with. |
| @@ -237,6 +241,14 @@ class PrefValueStore : public base::RefCountedThreadSafe<PrefValueStore> { |
| PrefStore* new_recommended_pref_store, |
| AfterRefreshCallback* callback); |
| + scoped_ptr<PrefStore> pref_stores_[PrefNotifier::PREF_STORE_TYPE_MAX + 1]; |
| + |
| + // A mapping of preference names to their registered types. |
| + PrefTypeMap pref_types_; |
| + |
| + // The associated profile, if applicable. |
| + Profile* profile_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PrefValueStore); |
| }; |