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

Unified Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 10533038: Switch back to the old method of launching the login flow while keeping some of the benefits of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 8 years, 6 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: 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 e67bf51e7dc113ee9fee888337788d9387e00678..d72201c0879b0e66e27b5263af81023ccb871dec 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -278,6 +278,35 @@ void TestingAutomationProvider::LoginAsGuest(DictionaryValue* args,
controller->LoginAsGuest();
}
+void TestingAutomationProvider::StartLogin(DictionaryValue* args,
+ IPC::Message* reply_message) {
+ AutomationJSONReply reply(this, reply_message);
+ LOG(ERROR) << "TestingAutomationProvider::Login";
Nirnimesh 2012/06/07 00:30:55 Login->StartLogin Why LOG(ERROR)?
craigdh 2012/06/07 19:12:01 No idea, this hook is nearly a direct revert. I'll
+
+ 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());
+ LOG(ERROR) << "TestingAutomationProvider::Login ShowSigninScreenForCreds("
Nirnimesh 2012/06/07 00:30:55 Use VLOG(2)
craigdh 2012/06/07 19:12:01 Done.
+ << username << ", " << password << ")";
+
+ webui_login_display->ShowSigninScreenForCreds(username, password);
+ reply.SendSuccess(NULL);
+}
+
void TestingAutomationProvider::AddLoginEventObserver(
DictionaryValue* args, IPC::Message* reply_message) {
chromeos::ExistingUserController* controller =

Powered by Google App Engine
This is Rietveld 408576698