| 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 00b950bea2f6ba29b6a12320636a046287b40ae0..322db995fb1b6b5923910c1b81815592f62aa1ab 100644
|
| --- a/chrome/browser/signin/easy_unlock_service_signin_chromeos.h
|
| +++ b/chrome/browser/signin/easy_unlock_service_signin_chromeos.h
|
| @@ -14,9 +14,13 @@
|
| #include "base/values.h"
|
| #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h"
|
| #include "chrome/browser/signin/easy_unlock_service.h"
|
| +#include "chrome/browser/signin/screenlock_bridge.h"
|
| +#include "chromeos/login/login_state.h"
|
|
|
| // EasyUnlockService instance that should be used for signin profile.
|
| -class EasyUnlockServiceSignin : public EasyUnlockService {
|
| +class EasyUnlockServiceSignin : public EasyUnlockService,
|
| + public ScreenlockBridge::Observer,
|
| + public chromeos::LoginState::Observer {
|
| public:
|
| explicit EasyUnlockServiceSignin(Profile* profile);
|
| virtual ~EasyUnlockServiceSignin();
|
| @@ -68,6 +72,17 @@ class EasyUnlockServiceSignin : public EasyUnlockService {
|
| virtual bool IsAllowedInternal() OVERRIDE;
|
| virtual void InitializeInternal() OVERRIDE;
|
|
|
| + // ScreenlockBridge::Observer implementation:
|
| + virtual void OnScreenDidLock() OVERRIDE;
|
| + virtual void OnScreenDidUnlock() OVERRIDE;
|
| + virtual void OnFocusedUserChanged(const std::string& user_id) OVERRIDE;
|
| +
|
| + // chromeos::LoginState::Observer implementation:
|
| + virtual void LoggedInStateChanged() OVERRIDE;
|
| +
|
| + // Clears the service internal state.
|
| + void StopService();
|
| +
|
| // Loads the device data associated with the user's Easy unlock keys from
|
| // crypthome.
|
| void LoadCurrentUserDataIfNeeded();
|
| @@ -78,7 +93,7 @@ class EasyUnlockServiceSignin : public EasyUnlockService {
|
| bool success,
|
| const chromeos::EasyUnlockDeviceKeyDataList& data);
|
|
|
| - // If the device data has been loaded for the current user, returns is.
|
| + // If the device data has been loaded for the current user, returns it.
|
| // Otherwise, returns NULL.
|
| const UserData* FindLoadedDataForCurrentUser() const;
|
|
|
| @@ -94,6 +109,9 @@ class EasyUnlockServiceSignin : public EasyUnlockService {
|
| // first data load finishes (even if it fails).
|
| bool allow_cryptohome_backoff_;
|
|
|
| + // Whether the service has been stopped.
|
| + bool service_stopped_;
|
| +
|
| base::WeakPtrFactory<EasyUnlockServiceSignin> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceSignin);
|
|
|