| Index: chrome/browser/signin/easy_unlock_service.h
|
| diff --git a/chrome/browser/signin/easy_unlock_service.h b/chrome/browser/signin/easy_unlock_service.h
|
| index e57590f2912dab78d2816ab223fdab0afe72d969..6910d99194c48272a089796a91ba3d86cec10896 100644
|
| --- a/chrome/browser/signin/easy_unlock_service.h
|
| +++ b/chrome/browser/signin/easy_unlock_service.h
|
| @@ -25,6 +25,8 @@
|
| #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h"
|
| #endif
|
|
|
| +class AccountId;
|
| +
|
| namespace base {
|
| class DictionaryValue;
|
| class ListValue;
|
| @@ -85,10 +87,10 @@ class EasyUnlockService : public KeyedService {
|
| static void RegisterPrefs(PrefRegistrySimple* registry);
|
|
|
| // Removes the hardlock state for the given user.
|
| - static void ResetLocalStateForUser(const std::string& user_id);
|
| + static void ResetLocalStateForUser(const AccountId& account_id);
|
|
|
| // Returns the user's preferences.
|
| - static UserSettings GetUserSettings(const std::string& user_id);
|
| + static UserSettings GetUserSettings(const AccountId& account_id);
|
|
|
| // Returns the identifier for the device.
|
| static std::string GetDeviceId();
|
| @@ -97,7 +99,7 @@ class EasyUnlockService : public KeyedService {
|
| virtual Type GetType() const = 0;
|
|
|
| // Returns the user currently associated with the service.
|
| - virtual std::string GetUserEmail() const = 0;
|
| + virtual AccountId GetAccountId() const = 0;
|
|
|
| // Launches Easy Unlock setup app.
|
| virtual void LaunchSetup() = 0;
|
| @@ -132,11 +134,11 @@ class EasyUnlockService : public KeyedService {
|
| virtual std::string GetWrappedSecret() const = 0;
|
|
|
| // Records metrics for Easy sign-in outcome for the given user.
|
| - virtual void RecordEasySignInOutcome(const std::string& user_id,
|
| + virtual void RecordEasySignInOutcome(const AccountId& account_id,
|
| bool success) const = 0;
|
|
|
| // Records metrics for password based flow for the given user.
|
| - virtual void RecordPasswordLoginEvent(const std::string& user_id) const = 0;
|
| + virtual void RecordPasswordLoginEvent(const AccountId& account_id) const = 0;
|
|
|
| // Starts auto pairing.
|
| typedef base::Callback<void(bool success, const std::string& error)>
|
| @@ -183,12 +185,12 @@ class EasyUnlockService : public KeyedService {
|
|
|
| // Starts an auth attempt for the user associated with the service. The
|
| // attempt type (unlock vs. signin) will depend on the service type.
|
| - void AttemptAuth(const std::string& user_id);
|
| + void AttemptAuth(const AccountId& account_id);
|
|
|
| // Similar to above but a callback is invoked after the auth attempt is
|
| // finalized instead of default unlock/sign-in.
|
| typedef EasyUnlockAuthAttempt::FinalizedCallback AttemptAuthCallback;
|
| - void AttemptAuth(const std::string& user_id,
|
| + void AttemptAuth(const AccountId& account_id,
|
| const AttemptAuthCallback& callback);
|
|
|
| // Finalizes the previously started auth attempt for easy unlock. If called on
|
| @@ -202,7 +204,7 @@ class EasyUnlockService : public KeyedService {
|
| void FinalizeSignin(const std::string& secret);
|
|
|
| // Handles Easy Unlock auth failure for the user.
|
| - void HandleAuthFailure(const std::string& user_id);
|
| + void HandleAuthFailure(const AccountId& account_id);
|
|
|
| // Checks the consistency between pairing data and cryptohome keys. Set
|
| // hardlock state if the two do not match.
|
| @@ -289,7 +291,7 @@ class EasyUnlockService : public KeyedService {
|
| // Saves hardlock state for the given user. Update UI if the currently
|
| // associated user is the same.
|
| void SetHardlockStateForUser(
|
| - const std::string& user_id,
|
| + const AccountId& account_id,
|
| EasyUnlockScreenlockStateHandler::HardlockState state);
|
|
|
| // Returns the authentication event for a recent password sign-in or unlock,
|
| @@ -297,9 +299,9 @@ class EasyUnlockService : public KeyedService {
|
| EasyUnlockAuthEvent GetPasswordAuthEvent() const;
|
|
|
| // Called by subclasses when remote devices allowed to unlock the screen
|
| - // are loaded for |user_id|.
|
| + // are loaded for |account_id|.
|
| void SetProximityAuthDevices(
|
| - const std::string& user_id,
|
| + const AccountId& account_id,
|
| const proximity_auth::RemoteDeviceList& remote_devices);
|
|
|
| private:
|
| @@ -321,7 +323,7 @@ class EasyUnlockService : public KeyedService {
|
| #if defined(OS_CHROMEOS)
|
| // Callback for get key operation from CheckCryptohomeKeysAndMaybeHardlock.
|
| void OnCryptohomeKeysFetchedForChecking(
|
| - const std::string& user_id,
|
| + const AccountId& account_id,
|
| const std::set<std::string> paired_devices,
|
| bool success,
|
| const chromeos::EasyUnlockDeviceKeyDataList& key_data_list);
|
|
|