| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_USER_MANAGER_USER_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_H_ |
| 6 #define COMPONENTS_USER_MANAGER_USER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 183 |
| 184 // True if current user is logged in. | 184 // True if current user is logged in. |
| 185 bool is_logged_in() const; | 185 bool is_logged_in() const; |
| 186 | 186 |
| 187 // True if current user is active within the current session. | 187 // True if current user is active within the current session. |
| 188 bool is_active() const; | 188 bool is_active() const; |
| 189 | 189 |
| 190 // True if the user Profile is created. | 190 // True if the user Profile is created. |
| 191 bool is_profile_created() const { return profile_is_created_; } | 191 bool is_profile_created() const { return profile_is_created_; } |
| 192 | 192 |
| 193 static User* CreatePublicAccountUserForTesting(const AccountId& account_id) { |
| 194 return CreatePublicAccountUser(account_id); |
| 195 } |
| 196 |
| 193 protected: | 197 protected: |
| 194 friend class UserManagerBase; | 198 friend class UserManagerBase; |
| 195 friend class chromeos::ChromeUserManagerImpl; | 199 friend class chromeos::ChromeUserManagerImpl; |
| 196 friend class chromeos::SupervisedUserManagerImpl; | 200 friend class chromeos::SupervisedUserManagerImpl; |
| 197 friend class chromeos::UserImageManagerImpl; | 201 friend class chromeos::UserImageManagerImpl; |
| 198 friend class chromeos::UserSessionManager; | 202 friend class chromeos::UserSessionManager; |
| 199 | 203 |
| 200 // For testing: | 204 // For testing: |
| 201 friend class FakeUserManager; | 205 friend class FakeUserManager; |
| 202 friend class chromeos::FakeChromeUserManager; | 206 friend class chromeos::FakeChromeUserManager; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 326 |
| 323 DISALLOW_COPY_AND_ASSIGN(User); | 327 DISALLOW_COPY_AND_ASSIGN(User); |
| 324 }; | 328 }; |
| 325 | 329 |
| 326 // List of known users. | 330 // List of known users. |
| 327 using UserList = std::vector<User*>; | 331 using UserList = std::vector<User*>; |
| 328 | 332 |
| 329 } // namespace user_manager | 333 } // namespace user_manager |
| 330 | 334 |
| 331 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 335 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
| OLD | NEW |