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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 // been created yet or is already destroyed). This method is not thread-safe | 98 // been created yet or is already destroyed). This method is not thread-safe |
99 // and must be called from the main UI thread. | 99 // and must be called from the main UI thread. |
100 static UserManager* Get(); | 100 static UserManager* Get(); |
101 | 101 |
102 virtual ~UserManager(); | 102 virtual ~UserManager(); |
103 | 103 |
104 // Returns a list of users who have logged into this device previously. This | 104 // Returns a list of users who have logged into this device previously. This |
105 // is sorted by last login date with the most recent user at the beginning. | 105 // is sorted by last login date with the most recent user at the beginning. |
106 virtual const UserList& GetUsers() const = 0; | 106 virtual const UserList& GetUsers() const = 0; |
107 | 107 |
108 // Returns list of users admitted for logging in into multi-profile session. | 108 // Returns list of users admitted for logging in into multi-profile session. |
James Cook
2014/09/26 18:02:28
nit: admitted -> allowed
| |
109 // Users that have a policy that prevents them from being added to the | 109 // Users that have a policy that prevents them from being added to the |
110 // multi-profile session will still be part of this list as long as they | 110 // multi-profile session will still be part of this list as long as they |
111 // are regular users (i.e. not a public session/supervised etc.). | 111 // are regular users (i.e. not a public session/supervised etc.). |
112 // Returns an empty list in case when primary user is not a regular one or | 112 // Returns an empty list in case when primary user is not a regular one or |
113 // has a policy that prohibids it to be part of multi-profile session. | 113 // has a policy that prohibids it to be part of multi-profile session. |
114 virtual UserList GetUsersAdmittedForMultiProfile() const = 0; | 114 virtual UserList GetUsersAllowedForMultiProfile() const = 0; |
115 | 115 |
116 // Returns a list of users who are currently logged in. | 116 // Returns a list of users who are currently logged in. |
117 virtual const UserList& GetLoggedInUsers() const = 0; | 117 virtual const UserList& GetLoggedInUsers() const = 0; |
118 | 118 |
119 // Returns a list of users who are currently logged in in the LRU order - | 119 // Returns a list of users who are currently logged in in the LRU order - |
120 // so the active user is the first one in the list. If there is no user logged | 120 // so the active user is the first one in the list. If there is no user logged |
121 // in, the current user will be returned. | 121 // in, the current user will be returned. |
122 virtual const UserList& GetLRULoggedInUsers() const = 0; | 122 virtual const UserList& GetLRULoggedInUsers() const = 0; |
123 | 123 |
124 // Returns a list of users who can unlock the device. | 124 // Returns a list of users who can unlock the device. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 static UserManager* GetForTesting(); | 310 static UserManager* GetForTesting(); |
311 | 311 |
312 // Sets UserManager instance to the given |user_manager|. | 312 // Sets UserManager instance to the given |user_manager|. |
313 // Returns the previous value of the instance. | 313 // Returns the previous value of the instance. |
314 static UserManager* SetForTesting(UserManager* user_manager); | 314 static UserManager* SetForTesting(UserManager* user_manager); |
315 }; | 315 }; |
316 | 316 |
317 } // namespace user_manager | 317 } // namespace user_manager |
318 | 318 |
319 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 319 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
OLD | NEW |