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

Unified Diff: chrome/browser/pref_service.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 | « no previous file | chrome/browser/pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pref_service.h
===================================================================
--- chrome/browser/pref_service.h (revision 52169)
+++ chrome/browser/pref_service.h (working copy)
@@ -52,10 +52,27 @@
// Returns true if the current value matches the default value.
bool IsDefaultValue() const;
- // Returns true if the Preference is managed, i.e. not changeable
- // by the user.
+ // Returns true if the Preference is managed, i.e. set by an admin policy.
+ // Since managed prefs have the highest priority, this also indicates
+ // whether the pref is actually being controlled by the policy setting.
bool IsManaged() const;
+ // Returns true if the Preference has a value set by an extension, even if
+ // that value is being overridden by a higher-priority source.
+ bool HasExtensionSetting() const;
+
+ // Returns true if the Preference has a user setting, even if that value is
+ // being overridden by a higher-priority source.
+ bool HasUserSetting() const;
+
+ // Returns true if the Preference value is currently being controlled by an
+ // extension, and not by any higher-priority source.
+ bool IsExtensionControlled() const;
+
+ // Returns true if the Preference value is currently being controlled by a
+ // user setting, and not by any higher-priority source.
+ bool IsUserControlled() const;
+
private:
friend class PrefService;
« no previous file with comments | « no previous file | chrome/browser/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698