| 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_MANAGER_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
| 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/user_manager/user.h" | 10 #include "components/user_manager/user.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 virtual const UserList& GetUsers() const = 0; | 110 virtual const UserList& GetUsers() const = 0; |
| 111 | 111 |
| 112 // Returns list of users allowed for logging in into multi-profile session. | 112 // Returns list of users allowed for logging in into multi-profile session. |
| 113 // Users that have a policy that prevents them from being added to the | 113 // Users that have a policy that prevents them from being added to the |
| 114 // multi-profile session will still be part of this list as long as they | 114 // multi-profile session will still be part of this list as long as they |
| 115 // are regular users (i.e. not a public session/supervised etc.). | 115 // are regular users (i.e. not a public session/supervised etc.). |
| 116 // Returns an empty list in case when primary user is not a regular one or | 116 // Returns an empty list in case when primary user is not a regular one or |
| 117 // has a policy that prohibits it to be part of multi-profile session. | 117 // has a policy that prohibits it to be part of multi-profile session. |
| 118 virtual UserList GetUsersAllowedForMultiProfile() const = 0; | 118 virtual UserList GetUsersAllowedForMultiProfile() const = 0; |
| 119 | 119 |
| 120 // Returns list of users allowed for supervised user creation. | |
| 121 // Returns an empty list in cases when supervised user creation or adding new | |
| 122 // users is restricted. | |
| 123 virtual UserList GetUsersAllowedForSupervisedUsersCreation() const = 0; | |
| 124 | |
| 125 // Returns a list of users who are currently logged in. | 120 // Returns a list of users who are currently logged in. |
| 126 virtual const UserList& GetLoggedInUsers() const = 0; | 121 virtual const UserList& GetLoggedInUsers() const = 0; |
| 127 | 122 |
| 128 // Returns a list of users who are currently logged in in the LRU order - | 123 // Returns a list of users who are currently logged in in the LRU order - |
| 129 // so the active user is the first one in the list. If there is no user logged | 124 // so the active user is the first one in the list. If there is no user logged |
| 130 // in, the current user will be returned. | 125 // in, the current user will be returned. |
| 131 virtual const UserList& GetLRULoggedInUsers() const = 0; | 126 virtual const UserList& GetLRULoggedInUsers() const = 0; |
| 132 | 127 |
| 133 // Returns a list of users who can unlock the device. | 128 // Returns a list of users who can unlock the device. |
| 134 // This list is based on policy and whether user is able to do unlock. | 129 // This list is based on policy and whether user is able to do unlock. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 static UserManager* GetForTesting(); | 324 static UserManager* GetForTesting(); |
| 330 | 325 |
| 331 // Sets UserManager instance to the given |user_manager|. | 326 // Sets UserManager instance to the given |user_manager|. |
| 332 // Returns the previous value of the instance. | 327 // Returns the previous value of the instance. |
| 333 static UserManager* SetForTesting(UserManager* user_manager); | 328 static UserManager* SetForTesting(UserManager* user_manager); |
| 334 }; | 329 }; |
| 335 | 330 |
| 336 } // namespace user_manager | 331 } // namespace user_manager |
| 337 | 332 |
| 338 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 333 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
| OLD | NEW |