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

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: Merge 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 7a1179f6725f66dc339dd8bcebad32895158cc05..d4476dc21849908135ae2852a316495a8ab1aca1 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -176,6 +176,10 @@ void ExistingUserController::FixCaptivePortal() {
LoginAsGuest();
}
+void ExistingUserController::SetDisplayEmail(const std::string& email) {
+ display_email_ = email;
+}
+
void ExistingUserController::CompleteLogin(const std::string& username,
const std::string& password) {
SetOwnerUserInCryptohome();
@@ -365,6 +369,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.
+ display_email_.clear();
}
void ExistingUserController::OnLoginSuccess(
@@ -394,6 +401,7 @@ void ExistingUserController::OnLoginSuccess(
// Will call OnProfilePrepared() in the end.
LoginUtils::Get()->PrepareProfile(username,
+ display_email_,
password,
credentials,
pending_requests,
@@ -401,6 +409,7 @@ void ExistingUserController::OnLoginSuccess(
has_cookies,
this);
+ display_email_.clear();
// Notifiy LoginDisplay to allow it provide visual feedback to user.
login_display_->OnLoginSuccess(username);
@@ -522,6 +531,8 @@ void ExistingUserController::OnPasswordChangeDetected(
if (login_status_consumer_)
login_status_consumer_->OnPasswordChangeDetected(credentials);
+
+ display_email_.clear();
}
void ExistingUserController::WhiteListCheckFailed(const std::string& email) {
@@ -530,6 +541,8 @@ void ExistingUserController::WhiteListCheckFailed(const std::string& email) {
// Reenable clicking on other windows and status area.
login_display_->SetUIEnabled(true);
SetStatusAreaEnabled(true);
+
+ display_email_.clear();
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.h ('k') | chrome/browser/chromeos/login/login_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698