| Index: base/prefs/public/pref_change_registrar.h
|
| diff --git a/base/prefs/public/pref_change_registrar.h b/base/prefs/public/pref_change_registrar.h
|
| index f3abd9869191056aedecb8a731f499c94414f521..8d9d8dd6b1d10e85b5bf963f9df56331a8e958d8 100644
|
| --- a/base/prefs/public/pref_change_registrar.h
|
| +++ b/base/prefs/public/pref_change_registrar.h
|
| @@ -9,6 +9,7 @@
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/callback.h"
|
| #include "base/prefs/base_prefs_export.h"
|
|
|
| class PrefObserver;
|
| @@ -32,10 +33,14 @@ class BASE_PREFS_EXPORT PrefChangeRegistrar {
|
| // when the registrar's destructor is called unless the observer has been
|
| // explicitly removed by a call to Remove beforehand.
|
| void Add(const char* path, PrefObserver* obs);
|
| + void Add(const char* path, const base::Closure& obs);
|
|
|
| - // Removes a preference observer that has previously been added with a call to
|
| - // Add.
|
| + // Removes a preference observer that has previously been added with
|
| + // a call to Add. Note that in the base::Callback version of this
|
| + // method, you must pass an object whose Equal() method returns true
|
| + // when compared to the callback you registered via Add().
|
| void Remove(const char* path, PrefObserver* obs);
|
| + void Remove(const char* path, const base::Closure& obs);
|
|
|
| // Removes all observers that have been previously added with a call to Add.
|
| void RemoveAll();
|
| @@ -50,7 +55,7 @@ class BASE_PREFS_EXPORT PrefChangeRegistrar {
|
| bool IsManaged();
|
|
|
| private:
|
| - typedef std::pair<std::string, PrefObserver*> ObserverRegistration;
|
| + typedef std::pair<std::string, base::Closure> ObserverRegistration;
|
|
|
| std::set<ObserverRegistration> observers_;
|
| PrefServiceBase* service_;
|
|
|