| Index: chrome/browser/signin/easy_unlock_service_regular.cc
|
| diff --git a/chrome/browser/signin/easy_unlock_service_regular.cc b/chrome/browser/signin/easy_unlock_service_regular.cc
|
| index 90e017aa6e071bec9f584be7cdad2bde358156d7..88d30b65dbc94c9c128b2f4f6916048b4125c539 100644
|
| --- a/chrome/browser/signin/easy_unlock_service_regular.cc
|
| +++ b/chrome/browser/signin/easy_unlock_service_regular.cc
|
| @@ -155,7 +155,7 @@ EasyUnlockService::Type EasyUnlockServiceRegular::GetType() const {
|
| return EasyUnlockService::TYPE_REGULAR;
|
| }
|
|
|
| -std::string EasyUnlockServiceRegular::GetUserEmail() const {
|
| +const AccountId EasyUnlockServiceRegular::GetAccountId() const {
|
| const SigninManagerBase* signin_manager =
|
| SigninManagerFactory::GetForProfileIfExists(profile());
|
| // |profile| has to be a signed-in profile with SigninManager already
|
| @@ -163,7 +163,9 @@ std::string EasyUnlockServiceRegular::GetUserEmail() const {
|
| DCHECK(signin_manager);
|
| const std::string user_email =
|
| signin_manager->GetAuthenticatedAccountInfo().email;
|
| - return user_email.empty() ? user_email : gaia::CanonicalizeEmail(user_email);
|
| + return user_email.empty()
|
| + ? EmptyAccountId()
|
| + : AccountId::FromUserEmail(gaia::CanonicalizeEmail(user_email));
|
| }
|
|
|
| void EasyUnlockServiceRegular::LaunchSetup() {
|
| @@ -214,7 +216,7 @@ void EasyUnlockServiceRegular::SetHardlockAfterKeyOperation(
|
| EasyUnlockScreenlockStateHandler::HardlockState state_on_success,
|
| bool success) {
|
| if (success)
|
| - SetHardlockStateForUser(GetUserEmail(), state_on_success);
|
| + SetHardlockStateForUser(GetAccountId(), state_on_success);
|
|
|
| // Even if the refresh keys operation suceeded, we still fetch and check the
|
| // cryptohome keys against the keys in local preferences as a sanity check.
|
| @@ -371,13 +373,13 @@ std::string EasyUnlockServiceRegular::GetWrappedSecret() const {
|
| }
|
|
|
| void EasyUnlockServiceRegular::RecordEasySignInOutcome(
|
| - const std::string& user_id,
|
| + const AccountId& account_id,
|
| bool success) const {
|
| NOTREACHED();
|
| }
|
|
|
| void EasyUnlockServiceRegular::RecordPasswordLoginEvent(
|
| - const std::string& user_id) const {
|
| + const AccountId& account_id) const {
|
| NOTREACHED();
|
| }
|
|
|
| @@ -545,7 +547,7 @@ void EasyUnlockServiceRegular::OnScreenDidUnlock(
|
| }
|
|
|
| void EasyUnlockServiceRegular::OnFocusedUserChanged(
|
| - const std::string& user_id) {
|
| + const AccountId& account_id) {
|
| // Nothing to do.
|
| }
|
|
|
| @@ -591,8 +593,8 @@ void EasyUnlockServiceRegular::SyncProfilePrefsToLocalState() {
|
|
|
| DictionaryPrefUpdate update(local_state,
|
| prefs::kEasyUnlockLocalStateUserPrefs);
|
| - std::string user_email = GetUserEmail();
|
| - update->SetWithoutPathExpansion(user_email, user_prefs_dict.Pass());
|
| + update->SetWithoutPathExpansion(GetAccountId().GetUserEmail(),
|
| + user_prefs_dict.Pass());
|
| }
|
|
|
| cryptauth::GcmDeviceInfo EasyUnlockServiceRegular::GetGcmDeviceInfo() {
|
|
|