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

Unified Diff: chromeos/login/auth/stub_authenticator.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 years, 8 months 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: chromeos/login/auth/stub_authenticator.cc
diff --git a/chromeos/login/auth/stub_authenticator.cc b/chromeos/login/auth/stub_authenticator.cc
index 8a3e30f263d0e6bbe8eae274dac6d297f7132972..6613ea2b7f4623542b9a673a1bcd7432999ae680 100644
--- a/chromeos/login/auth/stub_authenticator.cc
+++ b/chromeos/login/auth/stub_authenticator.cc
@@ -35,7 +35,10 @@ void StubAuthenticator::CompleteLogin(content::BrowserContext* context,
void StubAuthenticator::AuthenticateToLogin(content::BrowserContext* context,
const UserContext& user_context) {
authentication_context_ = context;
- if (user_context == expected_user_context_) {
+ // Don't compare the entire |expected_user_context_| to |user_context| because
+ // during non-online re-auth |user_context| does not have a gaia id.
+ if (expected_user_context_.GetUserID() == user_context.GetUserID() &&
+ *expected_user_context_.GetKey() == *user_context.GetKey()) {
message_loop_->PostTask(
FROM_HERE, base::Bind(&StubAuthenticator::OnAuthSuccess, this));
return;

Powered by Google App Engine
This is Rietveld 408576698