Chromium Code Reviews| Index: chromeos/login/auth/login_performer.cc |
| diff --git a/chromeos/login/auth/login_performer.cc b/chromeos/login/auth/login_performer.cc |
| index ba4e82bd3b0657de4cc10d421d8b4da9ead4e0d1..7c69f36ee158d205ce8507e17c24168ebcd8a534 100644 |
| --- a/chromeos/login/auth/login_performer.cc |
| +++ b/chromeos/login/auth/login_performer.cc |
| @@ -18,6 +18,7 @@ |
| #include "chromeos/login/user_names.h" |
| #include "chromeos/login_event_recorder.h" |
| #include "chromeos/settings/cros_settings_names.h" |
| +#include "components/signin/core/account_id/account_id.h" |
| #include "google_apis/gaia/gaia_auth_util.h" |
| #include "net/cookies/cookie_monster.h" |
| #include "net/cookies/cookie_store.h" |
| @@ -107,7 +108,7 @@ void LoginPerformer::OnPasswordChangeDetected() { |
| void LoginPerformer::NotifyWhitelistCheckFailure() { |
| if (delegate_) |
| - delegate_->WhiteListCheckFailed(user_context_.GetUserID()); |
| + delegate_->WhiteListCheckFailed(user_context_.GetUserID().GetUserEmail()); |
| else |
| NOTREACHED(); |
| } |
| @@ -128,7 +129,8 @@ void LoginPerformer::PerformLogin(const UserContext& user_context, |
| void LoginPerformer::DoPerformLogin(const UserContext& user_context, |
| AuthorizationMode auth_mode) { |
| - std::string email = gaia::CanonicalizeEmail(user_context.GetUserID()); |
| + std::string email = |
|
achuithb
2015/10/23 00:08:51
const, isn't this already canonicalized?
Alexander Alekseev
2015/10/23 09:11:24
No ;-(
|
| + gaia::CanonicalizeEmail(user_context.GetUserID().GetUserEmail()); |
| bool wildcard_match = false; |
| if (!IsUserWhitelisted(email, &wildcard_match)) { |
| @@ -137,7 +139,7 @@ void LoginPerformer::DoPerformLogin(const UserContext& user_context, |
| } |
| if (user_context.GetAuthFlow() == UserContext::AUTH_FLOW_EASY_UNLOCK) |
| - SetupEasyUnlockUserFlow(user_context.GetUserID()); |
| + SetupEasyUnlockUserFlow(user_context.GetUserID().GetUserEmail()); |
| switch (auth_mode_) { |
| case AUTH_MODE_EXTENSION: { |
| @@ -157,7 +159,7 @@ void LoginPerformer::DoPerformLogin(const UserContext& user_context, |
| void LoginPerformer::LoginAsSupervisedUser(const UserContext& user_context) { |
| DCHECK_EQ(chromeos::login::kSupervisedUserDomain, |
| - gaia::ExtractDomainName(user_context.GetUserID())); |
| + gaia::ExtractDomainName(user_context.GetUserID().GetUserEmail())); |
| user_context_ = user_context; |
| user_context_.SetUserType(user_manager::USER_TYPE_SUPERVISED); |
| @@ -174,11 +176,11 @@ void LoginPerformer::TrustedLoginAsSupervisedUser( |
| const UserContext& user_context) { |
| if (!AreSupervisedUsersAllowed()) { |
| LOG(ERROR) << "Login attempt of supervised user detected."; |
| - delegate_->WhiteListCheckFailed(user_context.GetUserID()); |
| + delegate_->WhiteListCheckFailed(user_context.GetUserID().GetUserEmail()); |
| return; |
| } |
| - SetupSupervisedUserFlow(user_context.GetUserID()); |
| + SetupSupervisedUserFlow(user_context.GetUserID().GetUserEmail()); |
| UserContext user_context_copy = TransformSupervisedKey(user_context); |
| if (UseExtendedAuthenticatorForSupervisedUser(user_context)) { |
| @@ -202,7 +204,7 @@ void LoginPerformer::TrustedLoginAsSupervisedUser( |
| } |
| void LoginPerformer::LoginAsPublicSession(const UserContext& user_context) { |
| - if (!CheckPolicyForUser(user_context.GetUserID())) { |
| + if (!CheckPolicyForUser(user_context.GetUserID().GetUserEmail())) { |
| DCHECK(delegate_); |
| if (delegate_) |
| delegate_->PolicyLoadFailed(); |