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

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

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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/fake_extended_authenticator.cc ('k') | chromeos/login/auth/stub_authenticator.cc » ('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 ba4e82bd3b0657de4cc10d421d8b4da9ead4e0d1..b988f1d3786382e5017e1c033355d1416438b360 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,8 @@ void LoginPerformer::OnPasswordChangeDetected() {
void LoginPerformer::NotifyWhitelistCheckFailure() {
if (delegate_)
- delegate_->WhiteListCheckFailed(user_context_.GetUserID());
+ delegate_->WhiteListCheckFailed(
+ user_context_.GetAccountId().GetUserEmail());
else
NOTREACHED();
}
@@ -128,7 +130,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());
+ const std::string email =
+ gaia::CanonicalizeEmail(user_context.GetAccountId().GetUserEmail());
bool wildcard_match = false;
if (!IsUserWhitelisted(email, &wildcard_match)) {
@@ -137,7 +140,7 @@ void LoginPerformer::DoPerformLogin(const UserContext& user_context,
}
if (user_context.GetAuthFlow() == UserContext::AUTH_FLOW_EASY_UNLOCK)
- SetupEasyUnlockUserFlow(user_context.GetUserID());
+ SetupEasyUnlockUserFlow(user_context.GetAccountId().GetUserEmail());
switch (auth_mode_) {
case AUTH_MODE_EXTENSION: {
@@ -156,8 +159,9 @@ void LoginPerformer::DoPerformLogin(const UserContext& user_context,
}
void LoginPerformer::LoginAsSupervisedUser(const UserContext& user_context) {
- DCHECK_EQ(chromeos::login::kSupervisedUserDomain,
- gaia::ExtractDomainName(user_context.GetUserID()));
+ DCHECK_EQ(
+ chromeos::login::kSupervisedUserDomain,
+ gaia::ExtractDomainName(user_context.GetAccountId().GetUserEmail()));
user_context_ = user_context;
user_context_.SetUserType(user_manager::USER_TYPE_SUPERVISED);
@@ -174,11 +178,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.GetAccountId().GetUserEmail());
return;
}
- SetupSupervisedUserFlow(user_context.GetUserID());
+ SetupSupervisedUserFlow(user_context.GetAccountId().GetUserEmail());
UserContext user_context_copy = TransformSupervisedKey(user_context);
if (UseExtendedAuthenticatorForSupervisedUser(user_context)) {
@@ -202,7 +206,7 @@ void LoginPerformer::TrustedLoginAsSupervisedUser(
}
void LoginPerformer::LoginAsPublicSession(const UserContext& user_context) {
- if (!CheckPolicyForUser(user_context.GetUserID())) {
+ if (!CheckPolicyForUser(user_context.GetAccountId().GetUserEmail())) {
DCHECK(delegate_);
if (delegate_)
delegate_->PolicyLoadFailed();
« no previous file with comments | « chromeos/login/auth/fake_extended_authenticator.cc ('k') | chromeos/login/auth/stub_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698