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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bool is_logged_in() const; | 173 bool is_logged_in() const; |
174 | 174 |
175 // True if current user is active within the current session. | 175 // True if current user is active within the current session. |
176 bool is_active() const; | 176 bool is_active() const; |
177 | 177 |
178 // True if the user Profile is created. | 178 // True if the user Profile is created. |
179 bool is_profile_created() const { return profile_is_created_; } | 179 bool is_profile_created() const { return profile_is_created_; } |
180 | 180 |
181 protected: | 181 protected: |
182 friend class UserManagerBase; | 182 friend class UserManagerBase; |
183 friend class chromeos::ChromeUserManagerImpl; | 183 friend class ::chromeos::ChromeUserManagerImpl; |
184 friend class chromeos::SupervisedUserManagerImpl; | 184 friend class ::chromeos::SupervisedUserManagerImpl; |
185 friend class chromeos::UserImageManagerImpl; | 185 friend class ::chromeos::UserImageManagerImpl; |
186 friend class chromeos::UserSessionManager; | 186 friend class ::chromeos::UserSessionManager; |
187 | 187 |
188 // For testing: | 188 // For testing: |
189 friend class FakeUserManager; | 189 friend class FakeUserManager; |
190 friend class chromeos::FakeChromeUserManager; | 190 friend class ::chromeos::FakeChromeUserManager; |
191 friend class chromeos::MockUserManager; | 191 friend class ::chromeos::MockUserManager; |
192 friend class chromeos::UserAddingScreenTest; | 192 friend class ::chromeos::UserAddingScreenTest; |
193 FRIEND_TEST_ALL_PREFIXES(UserTest, DeviceLocalAccountAffiliation); | 193 FRIEND_TEST_ALL_PREFIXES(UserTest, DeviceLocalAccountAffiliation); |
194 | 194 |
195 // Do not allow anyone else to create new User instances. | 195 // Do not allow anyone else to create new User instances. |
196 static User* CreateRegularUser(const AccountId& account_id); | 196 static User* CreateRegularUser(const AccountId& account_id); |
197 static User* CreateGuestUser(const AccountId& guest_account_id); | 197 static User* CreateGuestUser(const AccountId& guest_account_id); |
198 static User* CreateKioskAppUser(const AccountId& kiosk_app_account_id); | 198 static User* CreateKioskAppUser(const AccountId& kiosk_app_account_id); |
199 static User* CreateArcKioskAppUser(const AccountId& arc_kiosk_account_id); | 199 static User* CreateArcKioskAppUser(const AccountId& arc_kiosk_account_id); |
200 static User* CreateSupervisedUser(const AccountId& account_id); | 200 static User* CreateSupervisedUser(const AccountId& account_id); |
201 static User* CreatePublicAccountUser(const AccountId& account_id); | 201 static User* CreatePublicAccountUser(const AccountId& account_id); |
202 | 202 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 DISALLOW_COPY_AND_ASSIGN(User); | 305 DISALLOW_COPY_AND_ASSIGN(User); |
306 }; | 306 }; |
307 | 307 |
308 // List of known users. | 308 // List of known users. |
309 using UserList = std::vector<User*>; | 309 using UserList = std::vector<User*>; |
310 | 310 |
311 } // namespace user_manager | 311 } // namespace user_manager |
312 | 312 |
313 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 313 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
OLD | NEW |