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

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

Powered by Google App Engine
This is Rietveld 408576698