| Index: chrome/browser/chromeos/cros_settings_provider.h
|
| diff --git a/chrome/browser/chromeos/cros_settings_provider.h b/chrome/browser/chromeos/cros_settings_provider.h
|
| index ba65253a3f30a71a55feee707566379c61db4634..fac72c636c53c3ff0ba46718ac758915865b40ef 100644
|
| --- a/chrome/browser/chromeos/cros_settings_provider.h
|
| +++ b/chrome/browser/chromeos/cros_settings_provider.h
|
| @@ -17,6 +17,13 @@ namespace chromeos {
|
|
|
| class CrosSettingsProvider {
|
| public:
|
| + // The callback type that is called to notify the CrosSettings observers
|
| + // about a setting change.
|
| + typedef base::Callback<void(const std::string&)> NotifyObserversCallback;
|
| +
|
| + // Creates a new provider instance. |notify_cb| will be used to notify
|
| + // about setting changes.
|
| + explicit CrosSettingsProvider(const NotifyObserversCallback& notify_cb);
|
| virtual ~CrosSettingsProvider() {}
|
|
|
| // Sets |in_value| to given |path| in cros settings.
|
| @@ -38,10 +45,17 @@ class CrosSettingsProvider {
|
| // Reloads the caches if the provider has any.
|
| virtual void Reload() = 0;
|
|
|
| + protected:
|
| + // Notifies the observers about a setting change.
|
| + void NotifyObservers(const std::string& path);
|
| +
|
| private:
|
| // Does the real job for Set().
|
| virtual void DoSet(const std::string& path,
|
| const base::Value& in_value) = 0;
|
| +
|
| + // Callback used to notify about setting changes.
|
| + NotifyObserversCallback notify_cb_;
|
| };
|
|
|
| } // namespace chromeos
|
|
|