| Index: chrome/browser/supervised_user/supervised_user_settings_service.h
|
| diff --git a/chrome/browser/supervised_user/supervised_user_settings_service.h b/chrome/browser/supervised_user/supervised_user_settings_service.h
|
| index 7a7041ef3953693e44dc2b8aaccb5530ab2a3e57..071da47621b8130b273863cf4185efb5988a982c 100644
|
| --- a/chrome/browser/supervised_user/supervised_user_settings_service.h
|
| +++ b/chrome/browser/supervised_user/supervised_user_settings_service.h
|
| @@ -9,6 +9,7 @@
|
| #include <vector>
|
|
|
| #include "base/callback.h"
|
| +#include "base/callback_list.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/prefs/pref_store.h"
|
| @@ -56,7 +57,9 @@ class SupervisedUserSettingsService : public KeyedService,
|
| // A callback whose first parameter is a dictionary containing all supervised
|
| // user settings. If the dictionary is NULL, it means that the service is
|
| // inactive, i.e. the user is not supervised.
|
| - typedef base::Callback<void(const base::DictionaryValue*)> SettingsCallback;
|
| + using SettingsCallbackType = void(const base::DictionaryValue*);
|
| + using SettingsCallback = base::Callback<SettingsCallbackType>;
|
| + using SettingsCallbackList = base::CallbackList<SettingsCallbackType>;
|
|
|
| SupervisedUserSettingsService();
|
| ~SupervisedUserSettingsService() override;
|
| @@ -76,7 +79,8 @@ class SupervisedUserSettingsService : public KeyedService,
|
|
|
| // Adds a callback to be called when supervised user settings are initially
|
| // available, or when they change.
|
| - void Subscribe(const SettingsCallback& callback);
|
| + scoped_ptr<base::CallbackList<SettingsCallbackType>::Subscription>
|
| + Subscribe(const SettingsCallback& callback);
|
|
|
| // Activates/deactivates the service. This is called by the
|
| // SupervisedUserService when it is (de)activated.
|
| @@ -157,7 +161,7 @@ class SupervisedUserSettingsService : public KeyedService,
|
| // A set of local settings that are fixed and not configured remotely.
|
| scoped_ptr<base::DictionaryValue> local_settings_;
|
|
|
| - std::vector<SettingsCallback> subscribers_;
|
| + SettingsCallbackList callback_list_;
|
|
|
| scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
|
| scoped_ptr<syncer::SyncErrorFactory> error_handler_;
|
|
|