| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 void ScreenLocker::Authenticate(const string16& password) { | 220 void ScreenLocker::Authenticate(const string16& password) { |
| 221 authentication_start_time_ = base::Time::Now(); | 221 authentication_start_time_ = base::Time::Now(); |
| 222 delegate_->SetInputEnabled(false); | 222 delegate_->SetInputEnabled(false); |
| 223 delegate_->OnAuthenticate(); | 223 delegate_->OnAuthenticate(); |
| 224 | 224 |
| 225 // If LoginPerformer instance exists, | 225 // If LoginPerformer instance exists, |
| 226 // initial online login phase is still active. | 226 // initial online login phase is still active. |
| 227 if (LoginPerformer::default_performer()) { | 227 if (LoginPerformer::default_performer()) { |
| 228 DVLOG(1) << "Delegating authentication to LoginPerformer."; | 228 DVLOG(1) << "Delegating authentication to LoginPerformer."; |
| 229 LoginPerformer::default_performer()->Login(user_.email(), | 229 LoginPerformer::default_performer()->PerformLogin( |
| 230 UTF16ToUTF8(password)); | 230 user_.email(), UTF16ToUTF8(password), |
| 231 LoginPerformer::AUTH_MODE_INTERNAL); |
| 231 } else { | 232 } else { |
| 232 BrowserThread::PostTask( | 233 BrowserThread::PostTask( |
| 233 BrowserThread::UI, FROM_HERE, | 234 BrowserThread::UI, FROM_HERE, |
| 234 base::Bind(&Authenticator::AuthenticateToUnlock, authenticator_.get(), | 235 base::Bind(&Authenticator::AuthenticateToUnlock, authenticator_.get(), |
| 235 user_.email(), UTF16ToUTF8(password))); | 236 user_.email(), UTF16ToUTF8(password))); |
| 236 } | 237 } |
| 237 } | 238 } |
| 238 | 239 |
| 239 void ScreenLocker::ClearErrors() { | 240 void ScreenLocker::ClearErrors() { |
| 240 delegate_->ClearErrors(); | 241 delegate_->ClearErrors(); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 bool state = true; | 356 bool state = true; |
| 356 content::NotificationService::current()->Notify( | 357 content::NotificationService::current()->Notify( |
| 357 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, | 358 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, |
| 358 content::Source<ScreenLocker>(this), | 359 content::Source<ScreenLocker>(this), |
| 359 content::Details<bool>(&state)); | 360 content::Details<bool>(&state)); |
| 360 DBusThreadManager::Get()->GetPowerManagerClient()-> | 361 DBusThreadManager::Get()->GetPowerManagerClient()-> |
| 361 NotifyScreenLockCompleted(); | 362 NotifyScreenLockCompleted(); |
| 362 } | 363 } |
| 363 | 364 |
| 364 } // namespace chromeos | 365 } // namespace chromeos |
| OLD | NEW |