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

Unified Diff: chrome/browser/prefs/pref_notifier.h

Issue 3323022: Create a DefaultPrefStore to hold registered application-default preference v... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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
Index: chrome/browser/prefs/pref_notifier.h
===================================================================
--- chrome/browser/prefs/pref_notifier.h (revision 59196)
+++ chrome/browser/prefs/pref_notifier.h (working copy)
@@ -32,6 +32,7 @@
// COMMAND_LINE contains preference values set by command-line switches.
// USER contains all user-set preference values.
// RECOMMENDED contains all recommended (policy) preference values.
+ // DEFAULT contains all application default preference values.
// This enum is kept in pref_notifier.h rather than pref_value_store.h in
// order to minimize additional headers needed by the *PrefStore files.
enum PrefStoreType {
@@ -43,7 +44,8 @@
COMMAND_LINE_STORE,
USER_STORE,
RECOMMENDED_STORE,
- PREF_STORE_TYPE_MAX = RECOMMENDED_STORE
+ DEFAULT_STORE,
+ PREF_STORE_TYPE_MAX = DEFAULT_STORE
};
// The |service| with which this notifier is associated will be sent as the
@@ -52,18 +54,17 @@
virtual ~PrefNotifier();
- // For the given pref_name, fire any observer of the pref if |old_value| is
- // different from the current value, or if the store controlling the value
- // has changed.
- // TODO(pamg): Currently notifies in some cases when it shouldn't. See
- // comments for PrefHasChanged() in pref_value_store.h.
+ // For the given pref_name, fire any observer of the pref if the effective
+ // value of the pref or the store controlling its value has changed, been
+ // added, or been removed (but not if it's re-setting the same value it had
+ // already). |new_store| should be the PrefStoreType of the store reporting
+ // the change.
void OnPreferenceSet(const char* pref_name,
- PrefNotifier::PrefStoreType new_store,
- const Value* old_value);
+ PrefNotifier::PrefStoreType new_store);
// Convenience method to be called when a preference is set in the
// USER_STORE. See OnPreferenceSet().
- void OnUserPreferenceSet(const char* pref_name, const Value* old_value);
+ void OnUserPreferenceSet(const char* pref_name);
// For the given pref_name, fire any observer of the pref. Virtual so it can
// be mocked for unit testing.

Powered by Google App Engine
This is Rietveld 408576698