Chromium Code Reviews| 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 f256a037360051355401675ca0fa3ae6a424255b..8390f39881e387f10e999aa1461da2b876335707 100644 |
| --- a/chrome/browser/automation/testing_automation_provider_chromeos.cc |
| +++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc |
| @@ -356,6 +356,33 @@ void TestingAutomationProvider::LoginAsGuest(DictionaryValue* args, |
| controller->LoginAsGuest(); |
| } |
| +void TestingAutomationProvider::LoginWithCachedCredentials( |
| + DictionaryValue* args, |
| + IPC::Message* reply_message) { |
| + AutomationJSONReply reply(this, reply_message); |
| + |
| + std::string username, password; |
| + if (!args->GetString("username", &username) || |
| + !args->GetString("password", &password)) { |
| + reply.SendError("Invalid or missing args."); |
| + return; |
| + } |
| + |
| + chromeos::ExistingUserController* controller = |
| + chromeos::ExistingUserController::current_controller(); |
| + if (!controller) { |
| + reply.SendError("Unable to access ExistingUserController"); |
| + return; |
| + } |
| + |
| + // WebUI login. |
| + chromeos::WebUILoginDisplay* webui_login_display = |
| + static_cast<chromeos::WebUILoginDisplay*>(controller->login_display()); |
| + |
| + webui_login_display->Login(username, password); |
|
craigdh
2012/09/18 18:16:35
This looks identical to SubmitLoginForm except for
beeps
2012/09/19 16:29:02
Done.
|
| + reply.SendSuccess(NULL); |
| +} |
| + |
| void TestingAutomationProvider::SubmitLoginForm(DictionaryValue* args, |
| IPC::Message* reply_message) { |
| AutomationJSONReply reply(this, reply_message); |