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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 8773046: [cros] Display emails of users are stored in a separate dictionary in Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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/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);

Powered by Google App Engine
This is Rietveld 408576698