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

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

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Fix profile creation, mojo types + rebase. Created 4 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: chromeos/login/auth/cryptohome_authenticator.cc
diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc
index 389dd6cd84f37d4dab0a8e1be4b7efaa188fceb9..b0443e798327e24f26239184a60827d689aa2ee2 100644
--- a/chromeos/login/auth/cryptohome_authenticator.cc
+++ b/chromeos/login/auth/cryptohome_authenticator.cc
@@ -218,6 +218,11 @@ void EnsureCryptohomeMigratedToGaiaId(
DoMount(attempt, resolver, ephemeral, create_if_nonexistent);
return;
}
+ if (attempt->user_context.GetAccountId().GetAccountType() ==
+ AccountType::ACTIVE_DIRECTORY) {
+ cryptohome::SetGaiaIdMigrationStatusDone(
+ attempt->user_context.GetAccountId());
+ }
const bool already_migrated = cryptohome::GetGaiaIdMigrationStatus(
attempt->user_context.GetAccountId());
const bool has_account_key =
@@ -501,7 +506,8 @@ void CryptohomeAuthenticator::AuthenticateToLogin(
void CryptohomeAuthenticator::CompleteLogin(content::BrowserContext* context,
const UserContext& user_context) {
- DCHECK_EQ(user_manager::USER_TYPE_REGULAR, user_context.GetUserType());
+ DCHECK(user_context.GetUserType() == user_manager::USER_TYPE_REGULAR ||
+ user_context.GetUserType() == user_manager::USER_TYPE_AD);
authentication_context_ = context;
current_state_.reset(new AuthAttemptState(user_context,
true, // unlock

Powered by Google App Engine
This is Rietveld 408576698