Index: chromeos/login/auth/cryptohome_authenticator.cc |
diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc |
index 156a66d49599b0d4d2a4777d1a7c5bbed64ef69e..e9e10174ead4f7aa5b548cfe88cca5f799e9e28f 100644 |
--- a/chromeos/login/auth/cryptohome_authenticator.cc |
+++ b/chromeos/login/auth/cryptohome_authenticator.cc |
@@ -148,9 +148,9 @@ void DoMount(const base::WeakPtr<AuthAttemptState>& attempt, |
} |
cryptohome::HomedirMethods::GetInstance()->MountEx( |
- cryptohome::Identification(attempt->user_context.GetUserID()), |
- cryptohome::Authorization(auth_key), |
- mount, |
+ cryptohome::Identification( |
+ attempt->user_context.GetAccountId().GetUserEmail()), |
+ cryptohome::Authorization(auth_key), mount, |
base::Bind(&OnMount, attempt, resolver)); |
} |
@@ -266,13 +266,10 @@ void StartMount(const base::WeakPtr<AuthAttemptState>& attempt, |
} |
cryptohome::HomedirMethods::GetInstance()->GetKeyDataEx( |
- cryptohome::Identification(attempt->user_context.GetUserID()), |
- kCryptohomeGAIAKeyLabel, |
- base::Bind(&OnGetKeyDataEx, |
- attempt, |
- resolver, |
- ephemeral, |
- create_if_nonexistent)); |
+ cryptohome::Identification( |
+ attempt->user_context.GetAccountId().GetUserEmail()), |
+ kCryptohomeGAIAKeyLabel, base::Bind(&OnGetKeyDataEx, attempt, resolver, |
+ ephemeral, create_if_nonexistent)); |
} |
// Calls cryptohome's mount method for guest and also get the user hash from |
@@ -286,7 +283,7 @@ void MountGuestAndGetHash(const base::WeakPtr<AuthAttemptState>& attempt, |
attempt, |
resolver)); |
cryptohome::AsyncMethodCaller::GetInstance()->AsyncGetSanitizedUsername( |
- attempt->user_context.GetUserID(), |
+ attempt->user_context.GetAccountId().GetUserEmail(), |
base::Bind(&TriggerResolveHash, attempt, resolver)); |
} |
@@ -295,14 +292,11 @@ void MountPublic(const base::WeakPtr<AuthAttemptState>& attempt, |
scoped_refptr<CryptohomeAuthenticator> resolver, |
int flags) { |
cryptohome::AsyncMethodCaller::GetInstance()->AsyncMountPublic( |
- attempt->user_context.GetUserID(), |
- flags, |
+ attempt->user_context.GetAccountId().GetUserEmail(), flags, |
base::Bind(&TriggerResolveWithLoginTimeMarker, |
- "CryptohomeMountPublic-End", |
- attempt, |
- resolver)); |
+ "CryptohomeMountPublic-End", attempt, resolver)); |
cryptohome::AsyncMethodCaller::GetInstance()->AsyncGetSanitizedUsername( |
- attempt->user_context.GetUserID(), |
+ attempt->user_context.GetAccountId().GetUserEmail(), |
base::Bind(&TriggerResolveHash, attempt, resolver)); |
} |
@@ -324,21 +318,17 @@ void Migrate(const base::WeakPtr<AuthAttemptState>& attempt, |
scoped_ptr<Key> new_key = |
TransformKeyIfNeeded(*attempt->user_context.GetKey(), system_salt); |
if (passing_old_hash) { |
- caller->AsyncMigrateKey(attempt->user_context.GetUserID(), |
- old_key->GetSecret(), |
- new_key->GetSecret(), |
- base::Bind(&TriggerResolveWithLoginTimeMarker, |
- "CryptohomeMount-End", |
- attempt, |
- resolver)); |
+ caller->AsyncMigrateKey( |
+ attempt->user_context.GetAccountId().GetUserEmail(), |
+ old_key->GetSecret(), new_key->GetSecret(), |
+ base::Bind(&TriggerResolveWithLoginTimeMarker, "CryptohomeMount-End", |
+ attempt, resolver)); |
} else { |
- caller->AsyncMigrateKey(attempt->user_context.GetUserID(), |
- new_key->GetSecret(), |
- old_key->GetSecret(), |
- base::Bind(&TriggerResolveWithLoginTimeMarker, |
- "CryptohomeMount-End", |
- attempt, |
- resolver)); |
+ caller->AsyncMigrateKey( |
+ attempt->user_context.GetAccountId().GetUserEmail(), |
+ new_key->GetSecret(), old_key->GetSecret(), |
+ base::Bind(&TriggerResolveWithLoginTimeMarker, "CryptohomeMount-End", |
+ attempt, resolver)); |
} |
} |
@@ -348,11 +338,9 @@ void Remove(const base::WeakPtr<AuthAttemptState>& attempt, |
chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker( |
"CryptohomeRemove-Start", false); |
cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove( |
- attempt->user_context.GetUserID(), |
- base::Bind(&TriggerResolveWithLoginTimeMarker, |
- "CryptohomeRemove-End", |
- attempt, |
- resolver)); |
+ attempt->user_context.GetAccountId().GetUserEmail(), |
+ base::Bind(&TriggerResolveWithLoginTimeMarker, "CryptohomeRemove-End", |
+ attempt, resolver)); |
} |
// Calls cryptohome's key check method. |
@@ -362,8 +350,7 @@ void CheckKey(const base::WeakPtr<AuthAttemptState>& attempt, |
scoped_ptr<Key> key = |
TransformKeyIfNeeded(*attempt->user_context.GetKey(), system_salt); |
cryptohome::AsyncMethodCaller::GetInstance()->AsyncCheckKey( |
- attempt->user_context.GetUserID(), |
- key->GetSecret(), |
+ attempt->user_context.GetAccountId().GetUserEmail(), key->GetSecret(), |
base::Bind(&TriggerResolve, attempt, resolver)); |
} |