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

Unified Diff: chromeos/cryptohome/cryptohome_parameters.cc

Issue 2593133002: Revert of Add account_type into AccountId (Closed)
Patch Set: 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/cryptohome/cryptohome_parameters.cc
diff --git a/chromeos/cryptohome/cryptohome_parameters.cc b/chromeos/cryptohome/cryptohome_parameters.cc
index 4f6d5579fb955ec3b880d50c8f607183445db253..9ce9c917de6459108320a22d95615be724e16ed0 100644
--- a/chromeos/cryptohome/cryptohome_parameters.cc
+++ b/chromeos/cryptohome/cryptohome_parameters.cc
@@ -19,7 +19,7 @@
const std::string GetCryptohomeId(const AccountId& account_id) {
// Guest/kiosk/managed/public accounts have empty GaiaId. Default to email.
- if (account_id.GetAccountType() == AccountType::UNKNOWN)
+ if (account_id.GetGaiaId().empty())
return account_id.GetUserEmail(); // Migrated
if (GetGaiaIdMigrationStatus(account_id))
@@ -56,7 +56,7 @@
// A LOT of tests start with --login_user <user>, and not registing this user
// before. So we might have "known_user" entry without gaia_id.
for (const AccountId& known_id : known_account_ids) {
- if (known_id.HasAccountIdKey() && known_id.GetAccountIdKey() == id_) {
+ if (!known_id.GetGaiaId().empty() && known_id.GetAccountIdKey() == id_) {
return known_id;
}
}
@@ -67,8 +67,8 @@
}
}
- return user_manager::known_user::GetAccountId(id_, std::string() /* id */,
- AccountType::UNKNOWN);
+ return user_manager::known_user::GetAccountId(id_,
+ std::string() /* gaia_id */);
}
KeyDefinition::AuthorizationData::Secret::Secret() : encrypt(false),
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/user_image_source.cc ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698