| 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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 it != users_.end(); | 271 it != users_.end(); |
| 272 ++it) { | 272 ++it) { |
| 273 if ((*it)->email() == user_context.username) { | 273 if ((*it)->email() == user_context.username) { |
| 274 unlock_user = *it; | 274 unlock_user = *it; |
| 275 break; | 275 break; |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 LOG_ASSERT(unlock_user); | 278 LOG_ASSERT(unlock_user); |
| 279 | 279 |
| 280 Profile* profile = UserManager::Get()->GetProfileByUser(unlock_user); | 280 Profile* profile = UserManager::Get()->GetProfileByUser(unlock_user); |
| 281 extensions::ScreenlockPrivateEventRouter* router = | 281 extensions::ScreenlockPrivateEventRouter* router = |
| 282 extensions::ScreenlockPrivateEventRouter::GetFactoryInstance() | 282 extensions::ScreenlockPrivateEventRouter::GetFactoryInstance()->Get( |
| 283 ->GetForProfile(profile); | 283 profile); |
| 284 router->OnAuthAttempted(auth_type, user_context.password); | 284 router->OnAuthAttempted(auth_type, user_context.password); |
| 285 return; | 285 return; |
| 286 } | 286 } |
| 287 | 287 |
| 288 BrowserThread::PostTask( | 288 BrowserThread::PostTask( |
| 289 BrowserThread::UI, FROM_HERE, | 289 BrowserThread::UI, FROM_HERE, |
| 290 base::Bind(&Authenticator::AuthenticateToUnlock, | 290 base::Bind(&Authenticator::AuthenticateToUnlock, |
| 291 authenticator_.get(), | 291 authenticator_.get(), |
| 292 user_context)); | 292 user_context)); |
| 293 } | 293 } |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 bool ScreenLocker::IsUserLoggedIn(const std::string& username) { | 526 bool ScreenLocker::IsUserLoggedIn(const std::string& username) { |
| 527 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) { | 527 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) { |
| 528 if ((*it)->email() == username) | 528 if ((*it)->email() == username) |
| 529 return true; | 529 return true; |
| 530 } | 530 } |
| 531 return false; | 531 return false; |
| 532 } | 532 } |
| 533 | 533 |
| 534 } // namespace chromeos | 534 } // namespace chromeos |
| OLD | NEW |