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

Unified Diff: chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc

Issue 1412813003: 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: Fix Win GN build. Created 5 years, 1 month 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: chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
index 74856040c8920487340ed91e96a340a85f126cd4..7fcd6e86fc33f7b3e080d34528aeacecdfcecbb5 100644
--- a/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
@@ -104,14 +104,15 @@ SupervisedUserAuthentication::GetStableSchema() {
UserContext SupervisedUserAuthentication::TransformKey(
const UserContext& context) {
UserContext result = context;
- int user_schema = GetPasswordSchema(context.GetUserID());
+ int user_schema = GetPasswordSchema(context.GetAccountId().GetUserEmail());
if (user_schema == SCHEMA_PLAIN)
return result;
if (user_schema == SCHEMA_SALT_HASHED) {
base::DictionaryValue holder;
std::string salt;
- owner_->GetPasswordInformation(context.GetUserID(), &holder);
+ owner_->GetPasswordInformation(context.GetAccountId().GetUserEmail(),
+ &holder);
holder.GetStringWithoutPathExpansion(kSalt, &salt);
DCHECK(!salt.empty());
Key* const key = result.GetKey();
@@ -120,7 +121,8 @@ UserContext SupervisedUserAuthentication::TransformKey(
result.SetIsUsingOAuth(false);
return result;
}
- NOTREACHED() << "Unknown password schema for " << context.GetUserID();
+ NOTREACHED() << "Unknown password schema for "
+ << context.GetAccountId().GetUserEmail();
return context;
}
@@ -223,8 +225,8 @@ bool SupervisedUserAuthentication::NeedPasswordChange(
void SupervisedUserAuthentication::ScheduleSupervisedPasswordChange(
const std::string& supervised_user_id,
const base::DictionaryValue* password_data) {
- const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(supervised_user_id);
+ const user_manager::User* user = user_manager::UserManager::Get()->FindUser(
+ AccountId::FromUserEmail(supervised_user_id));
base::FilePath profile_path = ProfileHelper::GetProfilePathByUserIdHash(
user->username_hash());
JSONFileValueSerializer serializer(profile_path.Append(kPasswordUpdateFile));
@@ -281,8 +283,8 @@ void SupervisedUserAuthentication::LoadPasswordUpdateData(
const std::string& user_id,
const PasswordDataCallback& success_callback,
const base::Closure& failure_callback) {
- const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(user_id);
+ const user_manager::User* user = user_manager::UserManager::Get()->FindUser(
+ AccountId::FromUserEmail(user_id));
base::FilePath profile_path =
ProfileHelper::GetProfilePathByUserIdHash(user->username_hash());
PostTaskAndReplyWithResult(

Powered by Google App Engine
This is Rietveld 408576698