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

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

Issue 1425093004: Revert of 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: Created 5 years, 2 months 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 e9e10174ead4f7aa5b548cfe88cca5f799e9e28f..156a66d49599b0d4d2a4777d1a7c5bbed64ef69e 100644
--- a/chromeos/login/auth/cryptohome_authenticator.cc
+++ b/chromeos/login/auth/cryptohome_authenticator.cc
@@ -148,9 +148,9 @@
}
cryptohome::HomedirMethods::GetInstance()->MountEx(
- cryptohome::Identification(
- attempt->user_context.GetAccountId().GetUserEmail()),
- cryptohome::Authorization(auth_key), mount,
+ cryptohome::Identification(attempt->user_context.GetUserID()),
+ cryptohome::Authorization(auth_key),
+ mount,
base::Bind(&OnMount, attempt, resolver));
}
@@ -266,10 +266,13 @@
}
cryptohome::HomedirMethods::GetInstance()->GetKeyDataEx(
- cryptohome::Identification(
- attempt->user_context.GetAccountId().GetUserEmail()),
- kCryptohomeGAIAKeyLabel, base::Bind(&OnGetKeyDataEx, attempt, resolver,
- ephemeral, create_if_nonexistent));
+ cryptohome::Identification(attempt->user_context.GetUserID()),
+ kCryptohomeGAIAKeyLabel,
+ base::Bind(&OnGetKeyDataEx,
+ attempt,
+ resolver,
+ ephemeral,
+ create_if_nonexistent));
}
// Calls cryptohome's mount method for guest and also get the user hash from
@@ -283,7 +286,7 @@
attempt,
resolver));
cryptohome::AsyncMethodCaller::GetInstance()->AsyncGetSanitizedUsername(
- attempt->user_context.GetAccountId().GetUserEmail(),
+ attempt->user_context.GetUserID(),
base::Bind(&TriggerResolveHash, attempt, resolver));
}
@@ -292,11 +295,14 @@
scoped_refptr<CryptohomeAuthenticator> resolver,
int flags) {
cryptohome::AsyncMethodCaller::GetInstance()->AsyncMountPublic(
- attempt->user_context.GetAccountId().GetUserEmail(), flags,
+ attempt->user_context.GetUserID(),
+ flags,
base::Bind(&TriggerResolveWithLoginTimeMarker,
- "CryptohomeMountPublic-End", attempt, resolver));
+ "CryptohomeMountPublic-End",
+ attempt,
+ resolver));
cryptohome::AsyncMethodCaller::GetInstance()->AsyncGetSanitizedUsername(
- attempt->user_context.GetAccountId().GetUserEmail(),
+ attempt->user_context.GetUserID(),
base::Bind(&TriggerResolveHash, attempt, resolver));
}
@@ -318,17 +324,21 @@
scoped_ptr<Key> new_key =
TransformKeyIfNeeded(*attempt->user_context.GetKey(), system_salt);
if (passing_old_hash) {
- caller->AsyncMigrateKey(
- attempt->user_context.GetAccountId().GetUserEmail(),
- old_key->GetSecret(), new_key->GetSecret(),
- base::Bind(&TriggerResolveWithLoginTimeMarker, "CryptohomeMount-End",
- attempt, resolver));
+ caller->AsyncMigrateKey(attempt->user_context.GetUserID(),
+ old_key->GetSecret(),
+ new_key->GetSecret(),
+ base::Bind(&TriggerResolveWithLoginTimeMarker,
+ "CryptohomeMount-End",
+ attempt,
+ resolver));
} else {
- caller->AsyncMigrateKey(
- attempt->user_context.GetAccountId().GetUserEmail(),
- new_key->GetSecret(), old_key->GetSecret(),
- base::Bind(&TriggerResolveWithLoginTimeMarker, "CryptohomeMount-End",
- attempt, resolver));
+ caller->AsyncMigrateKey(attempt->user_context.GetUserID(),
+ new_key->GetSecret(),
+ old_key->GetSecret(),
+ base::Bind(&TriggerResolveWithLoginTimeMarker,
+ "CryptohomeMount-End",
+ attempt,
+ resolver));
}
}
@@ -338,9 +348,11 @@
chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker(
"CryptohomeRemove-Start", false);
cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove(
- attempt->user_context.GetAccountId().GetUserEmail(),
- base::Bind(&TriggerResolveWithLoginTimeMarker, "CryptohomeRemove-End",
- attempt, resolver));
+ attempt->user_context.GetUserID(),
+ base::Bind(&TriggerResolveWithLoginTimeMarker,
+ "CryptohomeRemove-End",
+ attempt,
+ resolver));
}
// Calls cryptohome's key check method.
@@ -350,7 +362,8 @@
scoped_ptr<Key> key =
TransformKeyIfNeeded(*attempt->user_context.GetKey(), system_salt);
cryptohome::AsyncMethodCaller::GetInstance()->AsyncCheckKey(
- attempt->user_context.GetAccountId().GetUserEmail(), key->GetSecret(),
+ attempt->user_context.GetUserID(),
+ key->GetSecret(),
base::Bind(&TriggerResolve, attempt, resolver));
}
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/user_image_source.cc ('k') | chromeos/login/auth/extended_authenticator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698