Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: chrome/browser/signin/easy_unlock_service_signin_chromeos.h

Issue 576343002: [Easy signin] Add method to get user info to easyUnlockPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win fix Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..035dfd0593c0ff02231e9995f50fbd280edd92d9 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();
@@ -65,8 +69,17 @@ class EasyUnlockServiceSignin : public EasyUnlockService {
virtual void ResetTurnOffFlow() OVERRIDE;
virtual TurnOffFlowStatus GetTurnOffFlowStatus() const OVERRIDE;
virtual std::string GetChallenge() const OVERRIDE;
- virtual bool IsAllowedInternal() OVERRIDE;
virtual void InitializeInternal() OVERRIDE;
+ virtual void ShutdownInternal() OVERRIDE;
+ virtual bool IsAllowedInternal() 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;
// Loads the device data associated with the user's Easy unlock keys from
// crypthome.
@@ -78,7 +91,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 +107,10 @@ class EasyUnlockServiceSignin : public EasyUnlockService {
// first data load finishes (even if it fails).
bool allow_cryptohome_backoff_;
+ // Whether the service has been successfully initialized, and has not been
+ // shut down.
+ bool service_active_;
+
base::WeakPtrFactory<EasyUnlockServiceSignin> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceSignin);
« no previous file with comments | « chrome/browser/signin/easy_unlock_service_regular.cc ('k') | chrome/browser/signin/easy_unlock_service_signin_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698