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

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

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix in original easy unlock code' Created 5 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
« no previous file with comments | « chromeos/login/auth/login_performer.h ('k') | components/proximity_auth/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/login/auth/login_performer.cc
diff --git a/chromeos/login/auth/login_performer.cc b/chromeos/login/auth/login_performer.cc
index b988f1d3786382e5017e1c033355d1416438b360..40b085c52fd4c7b58f5f9c7cd69678662db94091 100644
--- a/chromeos/login/auth/login_performer.cc
+++ b/chromeos/login/auth/login_performer.cc
@@ -130,22 +130,21 @@ void LoginPerformer::PerformLogin(const UserContext& user_context,
void LoginPerformer::DoPerformLogin(const UserContext& user_context,
AuthorizationMode auth_mode) {
- const std::string email =
- gaia::CanonicalizeEmail(user_context.GetAccountId().GetUserEmail());
bool wildcard_match = false;
- if (!IsUserWhitelisted(email, &wildcard_match)) {
+ const AccountId& account_id = user_context.GetAccountId();
+ if (!IsUserWhitelisted(account_id, &wildcard_match)) {
NotifyWhitelistCheckFailure();
return;
}
if (user_context.GetAuthFlow() == UserContext::AUTH_FLOW_EASY_UNLOCK)
- SetupEasyUnlockUserFlow(user_context.GetAccountId().GetUserEmail());
+ SetupEasyUnlockUserFlow(user_context.GetAccountId());
switch (auth_mode_) {
case AUTH_MODE_EXTENSION: {
RunOnlineWhitelistCheck(
- email, wildcard_match, user_context.GetRefreshToken(),
+ account_id, wildcard_match, user_context.GetRefreshToken(),
base::Bind(&LoginPerformer::StartLoginCompletion,
weak_factory_.GetWeakPtr()),
base::Bind(&LoginPerformer::NotifyWhitelistCheckFailure,
@@ -182,7 +181,7 @@ void LoginPerformer::TrustedLoginAsSupervisedUser(
return;
}
- SetupSupervisedUserFlow(user_context.GetAccountId().GetUserEmail());
+ SetupSupervisedUserFlow(user_context.GetAccountId());
UserContext user_context_copy = TransformSupervisedKey(user_context);
if (UseExtendedAuthenticatorForSupervisedUser(user_context)) {
@@ -206,7 +205,7 @@ void LoginPerformer::TrustedLoginAsSupervisedUser(
}
void LoginPerformer::LoginAsPublicSession(const UserContext& user_context) {
- if (!CheckPolicyForUser(user_context.GetAccountId().GetUserEmail())) {
+ if (!CheckPolicyForUser(user_context.GetAccountId())) {
DCHECK(delegate_);
if (delegate_)
delegate_->PolicyLoadFailed();
« no previous file with comments | « chromeos/login/auth/login_performer.h ('k') | components/proximity_auth/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698