| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_LOGIN_LOGIN_STATE_H_ | 5 #ifndef CHROMEOS_LOGIN_LOGIN_STATE_H_ |
| 6 #define CHROMEOS_LOGIN_LOGIN_STATE_H_ | 6 #define CHROMEOS_LOGIN_LOGIN_STATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Get the logged in user type. | 57 // Get the logged in user type. |
| 58 LoggedInUserType GetLoggedInUserType() const; | 58 LoggedInUserType GetLoggedInUserType() const; |
| 59 | 59 |
| 60 // Returns true if a user is considered to be logged in. | 60 // Returns true if a user is considered to be logged in. |
| 61 bool IsUserLoggedIn() const; | 61 bool IsUserLoggedIn() const; |
| 62 | 62 |
| 63 // Returns true if |logged_in_state_| is safe mode (i.e. the user is not yet | 63 // Returns true if |logged_in_state_| is safe mode (i.e. the user is not yet |
| 64 // logged in, and only the owner will be allowed to log in). | 64 // logged in, and only the owner will be allowed to log in). |
| 65 bool IsInSafeMode() const; | 65 bool IsInSafeMode() const; |
| 66 | 66 |
| 67 // Returns true if logged in and is a guest, retail, public, or kiosk user. | 67 // Returns true if logged in and is a guest, retail, or public user. |
| 68 bool IsGuestUser() const; | 68 bool IsGuestUser() const; |
| 69 | 69 |
| 70 // Returns true if the user is an authenticated user (i.e. non public account) | 70 // Returns true if the user is an authenticated user (i.e. non public account) |
| 71 bool IsUserAuthenticated() const; | 71 bool IsUserAuthenticated() const; |
| 72 | 72 |
| 73 // Returns true if the user is authenticated by logging into Google account | 73 // Returns true if the user is authenticated by logging into Google account |
| 74 // (i.e., non public nor locally managed account). | 74 // (i.e., non public nor locally managed account). |
| 75 bool IsUserGaiaAuthenticated() const; | 75 bool IsUserGaiaAuthenticated() const; |
| 76 | 76 |
| 77 void set_always_logged_in(bool always_logged_in) { | 77 void set_always_logged_in(bool always_logged_in) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 92 // default running on a Linux desktop without flags and test cases. To test | 92 // default running on a Linux desktop without flags and test cases. To test |
| 93 // behaviors with a specific login state, call set_always_logged_in(false). | 93 // behaviors with a specific login state, call set_always_logged_in(false). |
| 94 bool always_logged_in_; | 94 bool always_logged_in_; |
| 95 | 95 |
| 96 DISALLOW_COPY_AND_ASSIGN(LoginState); | 96 DISALLOW_COPY_AND_ASSIGN(LoginState); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace chromeos | 99 } // namespace chromeos |
| 100 | 100 |
| 101 #endif // CHROMEOS_LOGIN_LOGIN_STATE_H_ | 101 #endif // CHROMEOS_LOGIN_LOGIN_STATE_H_ |
| OLD | NEW |