| Index: chrome/browser/prefs/pref_change_registrar.h
|
| diff --git a/chrome/browser/prefs/pref_change_registrar.h b/chrome/browser/prefs/pref_change_registrar.h
|
| index cd8f5ebb8db5fc1da33fe92efdb7dbddd1a8750c..773c55614b2c72983be99c75eceb0b87cfd9309c 100644
|
| --- a/chrome/browser/prefs/pref_change_registrar.h
|
| +++ b/chrome/browser/prefs/pref_change_registrar.h
|
| @@ -23,7 +23,8 @@ class PrefChangeRegistrar {
|
| PrefChangeRegistrar();
|
| virtual ~PrefChangeRegistrar();
|
|
|
| - // Must be called before adding or removing observers.
|
| + // Must be called before adding or removing observers. Can be called more
|
| + // than once as long as the value of |service| doesn't change.
|
| void Init(PrefService* service);
|
|
|
| // Adds an pref observer for the specified pref |path| and |obs| observer
|
| @@ -38,6 +39,12 @@ class PrefChangeRegistrar {
|
| void Remove(const char* path,
|
| NotificationObserver* obs);
|
|
|
| + // Removes all observers that have been previously added with a call to Add.
|
| + void RemoveAll();
|
| +
|
| + // Returns true if no pref observers are registered.
|
| + bool IsEmpty() const;
|
| +
|
| private:
|
| typedef std::pair<std::string, NotificationObserver*> ObserverRegistration;
|
|
|
|
|