Index: chrome/browser/automation/testing_automation_provider_chromeos.cc |
diff --git a/chrome/browser/automation/testing_automation_provider_chromeos.cc b/chrome/browser/automation/testing_automation_provider_chromeos.cc |
index 000677fc80e57fb1a11be389e342e0de3872166a..9d69986134a9524c6e8483f86ffe50c7427ac67b 100644 |
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc |
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc |
@@ -19,6 +19,7 @@ |
#include "chrome/browser/chromeos/audio/audio_handler.h" |
#include "chrome/browser/chromeos/cros/cros_library.h" |
#include "chrome/browser/chromeos/cros/network_library.h" |
+#include "chrome/browser/chromeos/cros_settings.h" |
#include "chrome/browser/chromeos/login/default_user_images.h" |
#include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen.h" |
#include "chrome/browser/chromeos/login/eula_screen.h" |
@@ -1427,7 +1428,7 @@ void TestingAutomationProvider::SetMute(DictionaryValue* args, |
} |
void TestingAutomationProvider::OpenCrosh(DictionaryValue* args, |
- IPC::Message* reply_message) { |
+ IPC::Message* reply_message) { |
new NavigationNotificationObserver( |
NULL, this, reply_message, 1, false, true); |
ash::Shell::GetInstance()->delegate()->OpenCrosh(); |
@@ -1450,6 +1451,20 @@ void TestingAutomationProvider::CaptureProfilePhoto( |
window->Show(); |
} |
+void TestingAutomationProvider::SetCrosSetting(base::DictionaryValue* args, |
+ IPC::Message* reply_message) { |
+ AutomationJSONReply reply(this, reply_message); |
+ std::string path; |
+ base::Value* val; |
+ if (!args->GetString("path", &path) || !args->Get("value", &val)) { |
+ reply.SendError("Invalid or missing args."); |
+ return; |
+ } |
+ chromeos::CrosSettings* settings = chromeos::CrosSettings::Get(); |
+ settings->Set(path, *val); |
+ reply.SendSuccess(NULL); |
+} |
+ |
void TestingAutomationProvider::AddChromeosObservers() { |
power_manager_observer_ = new PowerManagerClientObserverForTesting; |
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |