OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
6 | 6 |
7 #include "chrome/browser/automation/automation_provider_observers.h" | 7 #include "chrome/browser/automation/automation_provider_observers.h" |
8 #include "chrome/browser/chromeos/login/login_screen.h" | 8 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 |
10 #include "chrome/browser/chromeos/login/wizard_controller.h" | 10 using chromeos::ExistingUserController; |
11 #include "views/window/window_gtk.h" | |
12 | 11 |
13 void AutomationProvider::LoginWithUserAndPass(const std::string& username, | 12 void AutomationProvider::LoginWithUserAndPass(const std::string& username, |
14 const std::string& password, | 13 const std::string& password, |
15 IPC::Message* reply_message) { | 14 IPC::Message* reply_message) { |
16 WizardController* controller = WizardController::default_controller(); | 15 ExistingUserController* controller = |
17 chromeos::NewUserView* new_user_view = | 16 ExistingUserController::current_controller(); |
18 controller->GetLoginScreen()->view(); | |
19 | |
20 new_user_view->SetUsername(username); | |
21 new_user_view->SetPassword(password); | |
22 | 17 |
23 // Set up an observer (it will delete itself). | 18 // Set up an observer (it will delete itself). |
24 new LoginManagerObserver(this, reply_message); | 19 new LoginManagerObserver(this, reply_message); |
25 | 20 |
26 new_user_view->Login(); | 21 controller->LoginNewUser(username, password); |
27 } | 22 } |
OLD | NEW |