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 db96b87c410f1187c31d1c056865d7e583043095..7b874d4a5ad6e3894e1d5a1a48ea41ed515c1024 100644 |
--- a/chrome/browser/signin/easy_unlock_service.h |
+++ b/chrome/browser/signin/easy_unlock_service.h |
@@ -18,6 +18,7 @@ |
#include "chrome/browser/signin/easy_unlock_screenlock_state_handler.h" |
#include "components/keyed_service/core/keyed_service.h" |
#include "components/proximity_auth/screenlock_state.h" |
+#include "components/user_manager/user_id.h" |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h" |
@@ -82,10 +83,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 user_manager::UserID& user_id); |
// Returns the user's preferences. |
- static UserSettings GetUserSettings(const std::string& user_id); |
+ static UserSettings GetUserSettings(const user_manager::UserID& user_id); |
// Returns the identifier for the device. |
static std::string GetDeviceId(); |
@@ -97,7 +98,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 user_manager::UserID GetUserID() const = 0; |
// Launches Easy Unlock setup app. |
virtual void LaunchSetup() = 0; |
@@ -131,11 +132,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 user_manager::UserID& user_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 user_manager::UserID& user_id) const = 0; |
// Starts auto pairing. |
typedef base::Callback<void(bool success, const std::string& error)> |
@@ -182,12 +183,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 user_manager::UserID& user_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 user_manager::UserID& user_id, |
const AttemptAuthCallback& callback); |
// Finalizes the previously started auth attempt for easy unlock. If called on |
@@ -201,7 +202,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 user_manager::UserID& user_id); |
// Checks the consistency between pairing data and cryptohome keys. Set |
// hardlock state if the two do not match. |
@@ -284,7 +285,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 user_manager::UserID& user_id, |
EasyUnlockScreenlockStateHandler::HardlockState state); |
// Returns the authentication event for a recent password sign-in or unlock, |
@@ -310,7 +311,7 @@ class EasyUnlockService : public KeyedService { |
#if defined(OS_CHROMEOS) |
// Callback for get key operation from CheckCryptohomeKeysAndMaybeHardlock. |
void OnCryptohomeKeysFetchedForChecking( |
- const std::string& user_id, |
+ const user_manager::UserID& user_id, |
const std::set<std::string> paired_devices, |
bool success, |
const chromeos::EasyUnlockDeviceKeyDataList& key_data_list); |