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

Unified Diff: chrome/browser/pref_value_store.h

Issue 2989002: Add methods for determining which PrefStore contains a given preference, and ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 5 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/browser/pref_service.cc ('k') | chrome/browser/pref_value_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pref_value_store.h
===================================================================
--- chrome/browser/pref_value_store.h (revision 52169)
+++ chrome/browser/pref_value_store.h (working copy)
@@ -80,11 +80,19 @@
// or recommended this function should have no effect.
void RemoveUserPrefValue(const wchar_t* name);
- // Returns true if the preference with the given name is managed.
- // A preference is managed if a managed value is available for that
- // preference.
- bool PrefValueIsManaged(const wchar_t* name);
+ // These methods return true if a preference with the given name is in the
+ // indicated pref store, even if that value is currently being overridden by
+ // a higher-priority source.
+ bool PrefValueInManagedStore(const wchar_t* name);
+ bool PrefValueInExtensionStore(const wchar_t* name);
+ bool PrefValueInUserStore(const wchar_t* name);
+ // These methods return true if a preference with the given name is actually
+ // being controlled by the indicated pref store and not being overridden by
+ // a higher-priority source.
+ bool PrefValueFromExtensionStore(const wchar_t* name);
+ bool PrefValueFromUserStore(const wchar_t* name);
+
private:
// PrefStores must be listed here in order from highest to lowest priority.
enum PrefStoreType {
@@ -97,6 +105,10 @@
scoped_ptr<PrefStore> pref_stores_[PREF_STORE_TYPE_MAX + 1];
+ bool PrefValueInStore(const wchar_t* name, PrefStoreType type);
+
+ bool PrefValueFromStore(const wchar_t* name, PrefStoreType type);
+
DISALLOW_COPY_AND_ASSIGN(PrefValueStore);
};
« no previous file with comments | « chrome/browser/pref_service.cc ('k') | chrome/browser/pref_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698