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

Unified Diff: chrome/browser/pref_value_store.h

Issue 3051001: Adjust preference sync code to only sync user modifiable preferences. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: separate out the download_manager_unittest.cc fixes 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_unittest.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
diff --git a/chrome/browser/pref_value_store.h b/chrome/browser/pref_value_store.h
index 885b7c0623d955fbcf7f71c7925cba6cb4f1e602..9dcce6456343675cdbff6f6978fa4407b8dea3fb 100644
--- a/chrome/browser/pref_value_store.h
+++ b/chrome/browser/pref_value_store.h
@@ -96,9 +96,16 @@ class PrefValueStore {
bool PrefValueFromExtensionStore(const wchar_t* name);
bool PrefValueFromUserStore(const wchar_t* name);
+ // Check whether a Preference value is modifiable by the user, i.e. whether
+ // there is no higher-priority source controlling it.
+ bool PrefValueUserModifiable(const wchar_t* name);
+
private:
// PrefStores must be listed here in order from highest to lowest priority.
enum PrefStoreType {
+ // Not associated with an actual PrefStore but used as invalid marker, e.g.
+ // as return value.
+ INVALID = -1,
MANAGED = 0,
EXTENSION,
COMMAND_LINE,
@@ -111,7 +118,10 @@ class PrefValueStore {
bool PrefValueInStore(const wchar_t* name, PrefStoreType type);
- bool PrefValueFromStore(const wchar_t* name, PrefStoreType type);
+ // Returns the pref store type identifying the source that controls the
+ // Preference identified by |name|. If none of the sources has a value,
+ // INVALID is returned.
+ PrefStoreType ControllingPrefStoreForPref(const wchar_t* name);
DISALLOW_COPY_AND_ASSIGN(PrefValueStore);
};
« no previous file with comments | « chrome/browser/pref_service_unittest.cc ('k') | chrome/browser/pref_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698