| Index: chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc
|
| diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc b/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc
|
| index a0f9eab12e33d41df22317281adbc87270dc3f8a..d9dabd52a6fa846d1678d6d23ad526a718a01102 100644
|
| --- a/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc
|
| +++ b/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc
|
| @@ -68,7 +68,7 @@ void Mount(SupervisedUserAuthenticator::AuthAttempt* attempt,
|
| Key key(attempt->password);
|
| key.Transform(Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, system_salt);
|
| cryptohome::AsyncMethodCaller::GetInstance()->AsyncMount(
|
| - attempt->username,
|
| + attempt->user_id,
|
| key.GetSecret(),
|
| flags,
|
| base::Bind(&TriggerResolveWithLoginTimeMarker,
|
| @@ -77,7 +77,7 @@ void Mount(SupervisedUserAuthenticator::AuthAttempt* attempt,
|
| resolver));
|
|
|
| cryptohome::AsyncMethodCaller::GetInstance()->AsyncGetSanitizedUsername(
|
| - attempt->username,
|
| + attempt->user_id,
|
| base::Bind(&TriggerResolveResult, attempt, resolver));
|
| }
|
|
|
| @@ -95,7 +95,7 @@ void AddKey(SupervisedUserAuthenticator::AuthAttempt* attempt,
|
| Key master_key(plain_text_master_key);
|
| master_key.Transform(Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, system_salt);
|
| cryptohome::AsyncMethodCaller::GetInstance()->AsyncAddKey(
|
| - attempt->username,
|
| + attempt->user_id,
|
| user_key.GetSecret(),
|
| master_key.GetSecret(),
|
| base::Bind(&TriggerResolveWithLoginTimeMarker,
|
| @@ -111,12 +111,10 @@ SupervisedUserAuthenticator::SupervisedUserAuthenticator(
|
| : consumer_(consumer) {}
|
|
|
| void SupervisedUserAuthenticator::AuthenticateToMount(
|
| - const std::string& username,
|
| + const user_manager::UserID& user_id,
|
| const std::string& password) {
|
| - std::string canonicalized = gaia::CanonicalizeEmail(username);
|
| -
|
| current_state_.reset(new SupervisedUserAuthenticator::AuthAttempt(
|
| - canonicalized, password, false));
|
| + user_id, password, false));
|
|
|
| SystemSaltGetter::Get()->GetSystemSalt(
|
| base::Bind(&Mount,
|
| @@ -126,12 +124,10 @@ void SupervisedUserAuthenticator::AuthenticateToMount(
|
| }
|
|
|
| void SupervisedUserAuthenticator::AuthenticateToCreate(
|
| - const std::string& username,
|
| + const user_manager::UserID& user_id,
|
| const std::string& password) {
|
| - std::string canonicalized = gaia::CanonicalizeEmail(username);
|
| -
|
| current_state_.reset(new SupervisedUserAuthenticator::AuthAttempt(
|
| - canonicalized, password, false));
|
| + user_id, password, false));
|
|
|
| SystemSaltGetter::Get()->GetSystemSalt(
|
| base::Bind(&Mount,
|
| @@ -141,13 +137,11 @@ void SupervisedUserAuthenticator::AuthenticateToCreate(
|
| }
|
|
|
| void SupervisedUserAuthenticator::AddMasterKey(
|
| - const std::string& username,
|
| + const user_manager::UserID& user_id,
|
| const std::string& password,
|
| const std::string& master_key) {
|
| - std::string canonicalized = gaia::CanonicalizeEmail(username);
|
| -
|
| current_state_.reset(new SupervisedUserAuthenticator::AuthAttempt(
|
| - canonicalized, password, true));
|
| + user_id, password, true));
|
|
|
| SystemSaltGetter::Get()->GetSystemSalt(
|
| base::Bind(&AddKey,
|
| @@ -288,10 +282,10 @@ SupervisedUserAuthenticator::AuthState
|
| }
|
|
|
| SupervisedUserAuthenticator::AuthAttempt::AuthAttempt(
|
| - const std::string& username,
|
| + const user_manager::UserID& user_id,
|
| const std::string& password,
|
| bool add_key_attempt)
|
| - : username(username),
|
| + : user_id(user_id),
|
| password(password),
|
| add_key(add_key_attempt),
|
| cryptohome_complete_(false),
|
|
|