| 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/chromeos/login/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void ExistingUserController::Login(UserController* source, | 117 void ExistingUserController::Login(UserController* source, |
| 118 const string16& password) { | 118 const string16& password) { |
| 119 std::vector<UserController*>::const_iterator i = | 119 std::vector<UserController*>::const_iterator i = |
| 120 std::find(controllers_.begin(), controllers_.end(), source); | 120 std::find(controllers_.begin(), controllers_.end(), source); |
| 121 DCHECK(i != controllers_.end()); | 121 DCHECK(i != controllers_.end()); |
| 122 selected_view_index_ = i - controllers_.begin(); | 122 selected_view_index_ = i - controllers_.begin(); |
| 123 | 123 |
| 124 authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); | 124 authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); |
| 125 Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile(); | 125 Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile(); |
| 126 ChromeThread::PostTask( | 126 ChromeThread::PostTask( |
| 127 ChromeThread::FILE, FROM_HERE, | 127 ChromeThread::UI, FROM_HERE, |
| 128 NewRunnableMethod(authenticator_.get(), | 128 NewRunnableMethod(authenticator_.get(), |
| 129 &Authenticator::AuthenticateToLogin, | 129 &Authenticator::AuthenticateToLogin, |
| 130 profile, | 130 profile, |
| 131 controllers_[selected_view_index_]->user().email(), | 131 controllers_[selected_view_index_]->user().email(), |
| 132 UTF16ToUTF8(password))); | 132 UTF16ToUTF8(password))); |
| 133 | 133 |
| 134 // Disable clicking on other windows. | 134 // Disable clicking on other windows. |
| 135 SendSetLoginState(false); | 135 SendSetLoginState(false); |
| 136 } | 136 } |
| 137 | 137 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // Delay deletion as we're on the stack. | 232 // Delay deletion as we're on the stack. |
| 233 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 233 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 | 236 |
| 237 void ExistingUserController::OnOffTheRecordLoginSuccess() { | 237 void ExistingUserController::OnOffTheRecordLoginSuccess() { |
| 238 LoginUtils::Get()->CompleteOffTheRecordLogin(); | 238 LoginUtils::Get()->CompleteOffTheRecordLogin(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace chromeos | 241 } // namespace chromeos |
| OLD | NEW |