| Index: chrome/browser/signin/easy_unlock_service_signin_chromeos.h
|
| diff --git a/chrome/browser/signin/easy_unlock_service_signin_chromeos.h b/chrome/browser/signin/easy_unlock_service_signin_chromeos.h
|
| index 8dd90f36e7c38f0079fad5ce3db37ead568b173d..9496f893d39619008659a33c777626d4d0d09caf 100644
|
| --- a/chrome/browser/signin/easy_unlock_service_signin_chromeos.h
|
| +++ b/chrome/browser/signin/easy_unlock_service_signin_chromeos.h
|
| @@ -31,17 +31,18 @@ class EasyUnlockServiceSignin
|
| explicit EasyUnlockServiceSignin(Profile* profile);
|
| ~EasyUnlockServiceSignin() override;
|
|
|
| - // Sets |user_id| as the current user of the service. Note this does
|
| + // Sets |account_id| as the current user of the service. Note this does
|
| // not change the focused user on the login screen.
|
| - void SetCurrentUser(const std::string& user_id);
|
| + void SetCurrentUser(const AccountId& account_id);
|
|
|
| - // Wraps the challenge for the remote device identified by |user_id| and the
|
| + // Wraps the challenge for the remote device identified by |account_id| and
|
| + // the
|
| // |device_public_key|. The |channel_binding_data| is signed by the TPM
|
| // included in the wrapped challenge.
|
| // |callback| will be invoked when wrapping is complete. If the user data is
|
| // not loaded yet, then |callback| will be invoked with an empty string.
|
| void WrapChallengeForUserAndDevice(
|
| - const std::string& user_id,
|
| + const AccountId& account_id,
|
| const std::string& device_public_key,
|
| const std::string& channel_binding_data,
|
| base::Callback<void(const std::string& wraped_challenge)> callback);
|
| @@ -78,7 +79,7 @@ class EasyUnlockServiceSignin
|
|
|
| // EasyUnlockService implementation:
|
| EasyUnlockService::Type GetType() const override;
|
| - std::string GetUserEmail() const override;
|
| + AccountId GetAccountId() const override;
|
| void LaunchSetup() override;
|
| const base::DictionaryValue* GetPermitAccess() const override;
|
| void SetPermitAccess(const base::DictionaryValue& permit) override;
|
| @@ -91,9 +92,9 @@ class EasyUnlockServiceSignin
|
| TurnOffFlowStatus GetTurnOffFlowStatus() const override;
|
| std::string GetChallenge() const override;
|
| std::string GetWrappedSecret() const override;
|
| - void RecordEasySignInOutcome(const std::string& user_id,
|
| + void RecordEasySignInOutcome(const AccountId& account_id,
|
| bool success) const override;
|
| - void RecordPasswordLoginEvent(const std::string& user_id) const override;
|
| + void RecordPasswordLoginEvent(const AccountId& account_id) const override;
|
| void StartAutoPairing(const AutoPairingResultCallback& callback) override;
|
| void SetAutoPairingResult(bool success, const std::string& error) override;
|
| void InitializeInternal() override;
|
| @@ -108,7 +109,7 @@ class EasyUnlockServiceSignin
|
| void OnScreenDidUnlock(
|
| proximity_auth::ScreenlockBridge::LockHandler::ScreenType screen_type)
|
| override;
|
| - void OnFocusedUserChanged(const std::string& user_id) override;
|
| + void OnFocusedUserChanged(const AccountId& account_id) override;
|
|
|
| // chromeos::LoginState::Observer implementation:
|
| void LoggedInStateChanged() override;
|
| @@ -118,30 +119,29 @@ class EasyUnlockServiceSignin
|
| void LoadCurrentUserDataIfNeeded();
|
|
|
| // Callback invoked when the user's device data is loaded from cryptohome.
|
| - void OnUserDataLoaded(
|
| - const std::string& user_id,
|
| - bool success,
|
| - const chromeos::EasyUnlockDeviceKeyDataList& data);
|
| + void OnUserDataLoaded(const AccountId& account_id,
|
| + bool success,
|
| + const chromeos::EasyUnlockDeviceKeyDataList& data);
|
|
|
| // If the device data has been loaded for the current user, returns it.
|
| // Otherwise, returns NULL.
|
| const UserData* FindLoadedDataForCurrentUser() const;
|
|
|
| // User id of the user currently associated with the service.
|
| - std::string user_id_;
|
| + AccountId account_id_;
|
|
|
| - // Maps user ids to their fetched cryptohome key data.
|
| - std::map<std::string, UserData*> user_data_;
|
| + // Maps account ids to their fetched cryptohome key data.
|
| + std::map<AccountId, UserData*> user_data_;
|
|
|
| // Whether failed attempts to load user data should be retried.
|
| // This is to handle case where cryptohome daemon is not started in time the
|
| // service attempts to load some data. Retries will be allowed only until the
|
| // first data load finishes (even if it fails).
|
| - bool allow_cryptohome_backoff_;
|
| + bool allow_cryptohome_backoff_ = true;
|
|
|
| // Whether the service has been successfully initialized, and has not been
|
| // shut down.
|
| - bool service_active_;
|
| + bool service_active_ = false;
|
|
|
| // The timestamp for the most recent time when a user pod was focused.
|
| base::TimeTicks user_pod_last_focused_timestamp_;
|
|
|