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

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

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Rename HandleAdAuth. Use system_api enums 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
« no previous file with comments | « chromeos/dbus/fake_auth_policy_client.cc ('k') | chromeos/login/auth/user_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e12ac3101f9c083600a272612b0a2e706c8b4dc5 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,9 @@ 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_ACTIVE_DIRECTORY);
authentication_context_ = context;
current_state_.reset(new AuthAttemptState(user_context,
true, // unlock
« no previous file with comments | « chromeos/dbus/fake_auth_policy_client.cc ('k') | chromeos/login/auth/user_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698