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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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/chromeos/login/lock/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc
index eea1b56bd8032eb74fffaea8f9d4c552f5c2feb2..38514038ac801999994ac03d21eed2323dc5aadb 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
@@ -197,7 +197,7 @@ void ScreenLocker::OnAuthFailure(const AuthFailure& error) {
void ScreenLocker::OnAuthSuccess(const UserContext& user_context) {
incorrect_passwords_count_ = 0;
if (authentication_start_time_.is_null()) {
- if (!user_context.GetUserID().empty())
+ if (user_context.GetAccountId().is_valid())
LOG(ERROR) << "Start time is not set at authentication success";
} else {
base::TimeDelta delta = base::Time::Now() - authentication_start_time_;
@@ -206,12 +206,12 @@ void ScreenLocker::OnAuthSuccess(const UserContext& user_context) {
}
const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(user_context.GetUserID());
+ user_manager::UserManager::Get()->FindUser(user_context.GetAccountId());
if (user) {
if (!user->is_active()) {
saved_ime_state_ = NULL;
user_manager::UserManager::Get()->SwitchActiveUser(
- user_context.GetUserID());
+ user_context.GetAccountId());
}
UserSessionManager::GetInstance()->UpdateEasyUnlockKeys(user_context);
} else {
@@ -250,7 +250,7 @@ void ScreenLocker::UnlockOnLoginSuccess() {
}
void ScreenLocker::Authenticate(const UserContext& user_context) {
- LOG_ASSERT(IsUserLoggedIn(user_context.GetUserID()))
+ LOG_ASSERT(IsUserLoggedIn(user_context.GetAccountId().GetUserEmail()))
<< "Invalid user trying to unlock.";
authentication_start_time_ = base::Time::Now();
@@ -259,7 +259,7 @@ void ScreenLocker::Authenticate(const UserContext& user_context) {
// Special case: supervised users. Use special authenticator.
if (const user_manager::User* user =
- FindUnlockUser(user_context.GetUserID())) {
+ FindUnlockUser(user_context.GetAccountId().GetUserEmail())) {
if (user->GetType() == user_manager::USER_TYPE_SUPERVISED) {
UserContext updated_context = ChromeUserManager::Get()
->GetSupervisedUserManager()
« no previous file with comments | « chrome/browser/chromeos/login/kiosk_browsertest.cc ('k') | chrome/browser/chromeos/login/lock/screen_locker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698