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

Unified Diff: chromeos/settings/cros_settings_provider.cc

Issue 1019283004: Switch to direct use of OwnerSettingsServiceChromeOS::Set() in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use settings provider to set read-only device settings. Created 5 years, 9 months 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: chromeos/settings/cros_settings_provider.cc
diff --git a/chromeos/settings/cros_settings_provider.cc b/chromeos/settings/cros_settings_provider.cc
index 98faf718ca788efd615b7daeff331ddc8e26d115..73d559f7a3d77d559a721e87675b2e2a03cf453c 100644
--- a/chromeos/settings/cros_settings_provider.cc
+++ b/chromeos/settings/cros_settings_provider.cc
@@ -34,6 +34,27 @@ void CrosSettingsProvider::Set(const std::string& path,
DoSet(path, value);
}
+void CrosSettingsProvider::SetBoolean(const std::string& path, bool in_value) {
+ base::FundamentalValue value(in_value);
+ Set(path, value);
+}
+
+void CrosSettingsProvider::SetInteger(const std::string& path, int in_value) {
+ base::FundamentalValue value(in_value);
+ Set(path, value);
+}
+
+void CrosSettingsProvider::SetDouble(const std::string& path, double in_value) {
+ base::FundamentalValue value(in_value);
+ Set(path, value);
+}
+
+void CrosSettingsProvider::SetString(const std::string& path,
+ const std::string& in_value) {
+ base::StringValue value(in_value);
+ Set(path, value);
+}
+
void CrosSettingsProvider::NotifyObservers(const std::string& path) {
if (!notify_cb_.is_null())
notify_cb_.Run(path);
« chromeos/settings/cros_settings_provider.h ('K') | « chromeos/settings/cros_settings_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698