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

Unified Diff: chromeos/login/login_state.h

Issue 23684033: Fix device policy recovery on CrOS login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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: chromeos/login/login_state.h
diff --git a/chromeos/login/login_state.h b/chromeos/login/login_state.h
index 34d15b3dbd4c9c0a336280f5c270332d75a35354..ede43881e4325c9956270dba602c8ca24589f385 100644
--- a/chromeos/login/login_state.h
+++ b/chromeos/login/login_state.h
@@ -15,9 +15,10 @@ namespace chromeos {
class CHROMEOS_EXPORT LoginState {
public:
enum LoggedInState {
- LOGGED_IN_OOBE, // Out of box experience not completed
- LOGGED_IN_NONE, // Not logged in
- LOGGED_IN_ACTIVE // A user has logged in
+ LOGGED_IN_OOBE, // Out of box experience not completed
+ LOGGED_IN_NONE, // Not logged in
+ LOGGED_IN_SAFE_MODE, // Not logged in and login not allowed for non-owners
+ LOGGED_IN_ACTIVE // A user has logged in
};
enum LoggedInUserType {
@@ -34,7 +35,7 @@ class CHROMEOS_EXPORT LoginState {
class Observer {
public:
// Called when the login state changes.
- virtual void LoggedInStateChanged(LoggedInState state) = 0;
+ virtual void LoggedInStateChanged() = 0;
protected:
virtual ~Observer() {}
@@ -53,13 +54,16 @@ class CHROMEOS_EXPORT LoginState {
// Set the logged in state and user type.
void SetLoggedInState(LoggedInState state, LoggedInUserType type);
- // Get the logged in state / user type.
- LoggedInState GetLoggedInState() const;
+ // Get the logged in user type.
LoggedInUserType GetLoggedInUserType() const;
- // Returns true if |logged_in_state_| is active.
+ // Returns true if an user is considered to be logged in.
stevenjb 2013/09/12 00:48:01 nit: 'a user' (English sucks)
tbarzic 2013/09/12 01:18:12 :)
bool IsUserLoggedIn() const;
+ // Returns true if |logged_in_state_| is safe mode (i.e. the user is not yet
+ // logged in, and only the owner will be allowed to log in).
+ bool IsInSafeMode() const;
+
// Returns true if logged in and is a guest, retail, public, or kiosk user.
bool IsGuestUser() const;

Powered by Google App Engine
This is Rietveld 408576698