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

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
« no previous file with comments | « chromeos/cert_loader.cc ('k') | chromeos/login/login_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/login/login_state.h
diff --git a/chromeos/login/login_state.h b/chromeos/login/login_state.h
index 68966f57ec721b875b2f0c0ad40f385b1924753a..0ef18a79a83b092689ece8bc87f11beae87aa084 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 either the login state or the logged in user type 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 a user is considered to be logged in.
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;
« no previous file with comments | « chromeos/cert_loader.cc ('k') | chromeos/login/login_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698