Index: chrome/browser/chromeos/login/existing_user_controller.cc |
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc |
index 1efdcdb8f1a9e94abab9428d0b65e12edb4176a9..5335fc6010fcef39d379fff273d7b412e3dfa279 100644 |
--- a/chrome/browser/chromeos/login/existing_user_controller.cc |
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc |
@@ -173,6 +173,10 @@ void ExistingUserController::FixCaptivePortal() { |
LoginAsGuest(); |
} |
+void ExistingUserController::SetDisplayEmail(const std::string& email) { |
+ next_login_display_email_ = email; |
+} |
+ |
void ExistingUserController::CompleteLogin(const std::string& username, |
const std::string& password) { |
SetOwnerUserInCryptohome(); |
@@ -362,6 +366,9 @@ void ExistingUserController::OnLoginFailure(const LoginFailure& failure) { |
if (login_status_consumer_) |
login_status_consumer_->OnLoginFailure(failure); |
+ |
+ // Clear the recorded displayed email so it won't affect any future attempts. |
+ next_login_display_email_.clear(); |
} |
void ExistingUserController::OnLoginSuccess( |
@@ -391,6 +398,7 @@ void ExistingUserController::OnLoginSuccess( |
// Will call OnProfilePrepared() in the end. |
LoginUtils::Get()->PrepareProfile(username, |
+ next_login_display_email_, |
password, |
credentials, |
pending_requests, |
@@ -398,6 +406,7 @@ void ExistingUserController::OnLoginSuccess( |
has_cookies, |
this); |
+ next_login_display_email_.clear(); |
// Notifiy LoginDisplay to allow it provide visual feedback to user. |
login_display_->OnLoginSuccess(username); |