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

Unified Diff: chrome/browser/pref_service.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_member_unittest.cc ('k') | 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
diff --git a/chrome/browser/pref_service.h b/chrome/browser/pref_service.h
index 255214ad65133902072857691fa2c4262599c0ff..5c105b6f44196b4bb4ae3c49c18f302eb4578fb7 100644
--- a/chrome/browser/pref_service.h
+++ b/chrome/browser/pref_service.h
@@ -73,6 +73,11 @@ class PrefService : public NonThreadSafe {
// user setting, and not by any higher-priority source.
bool IsUserControlled() const;
+ // Returns true if the user can change the Preference value, which is the
+ // case if no higher-priority source than the user store controls the
+ // Preference.
+ bool IsUserModifiable() const;
+
private:
friend class PrefService;
@@ -221,6 +226,9 @@ class PrefService : public NonThreadSafe {
bool read_only() const { return pref_value_store_->ReadOnly(); }
protected:
+ // For the given pref_name, fire any observer of the pref.
+ void FireObservers(const wchar_t* pref_name);
+
// This should only be accessed by subclasses for unit-testing.
bool PrefIsChanged(const wchar_t* path, const Value* old_value);
@@ -233,9 +241,6 @@ class PrefService : public NonThreadSafe {
// deleting the returned object.
Value* GetPrefCopy(const wchar_t* pref_name);
- // For the given pref_name, fire any observer of the pref.
- void FireObservers(const wchar_t* pref_name);
-
// Load from disk. Returns a non-zero error code on failure.
PrefStore::PrefReadError LoadPersistentPrefs();
« no previous file with comments | « chrome/browser/pref_member_unittest.cc ('k') | chrome/browser/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698