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

Unified Diff: base/prefs/public/pref_service_base.h

Issue 11368098: Draft change to use base::Closure instead of PrefObserver in PrefChangeRegistrar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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: base/prefs/public/pref_service_base.h
diff --git a/base/prefs/public/pref_service_base.h b/base/prefs/public/pref_service_base.h
index 131d221776b7e4345f0cc8aecf65b63bf48f945f..779b7b4c2e5c94a92ae80e8490df1c565050c6b8 100644
--- a/base/prefs/public/pref_service_base.h
+++ b/base/prefs/public/pref_service_base.h
@@ -16,6 +16,7 @@
#ifndef BASE_PREFS_PUBLIC_PREF_SERVICE_BASE_H_
#define BASE_PREFS_PUBLIC_PREF_SERVICE_BASE_H_
+#include "base/callback_forward.h"
#include "base/values.h"
namespace content {
@@ -259,12 +260,13 @@ class PrefServiceBase {
// These are protected so they can only be accessed by the friend
// classes listed above.
//
- // If the pref at the given path changes, we call the observer's
- // OnPreferenceChanged method. Note that observers should not call
- // these methods directly but rather use a PrefChangeRegistrar to
- // make sure the observer gets cleaned up properly.
- virtual void AddPrefObserver(const char* path, PrefObserver* obs) = 0;
- virtual void RemovePrefObserver(const char* path, PrefObserver* obs) = 0;
+ // If the pref at the given path changes, we run the closure. Note
+ // that observers should not call these methods directly but rather
+ // use a PrefChangeRegistrar to make sure the observer gets cleaned
+ // up properly.
+ virtual void AddPrefObserver(const char* path, const base::Closure& obs) = 0;
+ virtual void RemovePrefObserver(const char* path,
+ const base::Closure& obs) = 0;
};
#endif // BASE_PREFS_PUBLIC_PREF_SERVICE_BASE_H_

Powered by Google App Engine
This is Rietveld 408576698