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

Unified Diff: chrome/browser/chromeos/cros_settings_provider.cc

Issue 8899002: [cros] Add --stub-cros-settings option for testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CrosSettingsProvider instances use a callback for notifying observers. Created 9 years 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: chrome/browser/chromeos/cros_settings_provider.cc
diff --git a/chrome/browser/chromeos/cros_settings_provider.cc b/chrome/browser/chromeos/cros_settings_provider.cc
index 1eeaf5d414c2c8cf954895648eaa4f7232d8c50f..07cf7cd47ddcf26b9f40895ef924d91a3c474541 100644
--- a/chrome/browser/chromeos/cros_settings_provider.cc
+++ b/chrome/browser/chromeos/cros_settings_provider.cc
@@ -12,6 +12,11 @@
namespace chromeos {
+CrosSettingsProvider::CrosSettingsProvider(
+ const NotifyObserversCallback& notify_cb)
+ : notify_cb_(notify_cb) {
+}
+
void CrosSettingsProvider::Set(const std::string& path,
const base::Value& value) {
// We don't allow changing any of the cros settings without prefix
@@ -25,4 +30,8 @@ void CrosSettingsProvider::Set(const std::string& path,
DoSet(path, value);
}
+void CrosSettingsProvider::NotifyObservers(const std::string& path) {
+ notify_cb_.Run(path);
+}
+
}; // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698