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 "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // in. | 168 // in. |
169 virtual void SwitchActiveUser(const AccountId& account_id) = 0; | 169 virtual void SwitchActiveUser(const AccountId& account_id) = 0; |
170 | 170 |
171 // Switches to the last active user (called after crash happens and session | 171 // Switches to the last active user (called after crash happens and session |
172 // restore has completed). | 172 // restore has completed). |
173 virtual void SwitchToLastActiveUser() = 0; | 173 virtual void SwitchToLastActiveUser() = 0; |
174 | 174 |
175 // Invoked by session manager to inform session start. | 175 // Invoked by session manager to inform session start. |
176 virtual void OnSessionStarted() = 0; | 176 virtual void OnSessionStarted() = 0; |
177 | 177 |
| 178 // Invoked once session initialization has been completed. This allows various |
| 179 // subsystems (for example, policy framework) to skip an expensive online |
| 180 // initialization process, and also allows the signin screen to force an |
| 181 // online signin if it knows that profile initialization has not yet |
| 182 // completed. |user| is the User associated with the session that has |
| 183 // completed initialization. |
| 184 virtual void OnSessionInitialized(User* user) = 0; |
| 185 |
178 // Removes the user from the device. Note, it will verify that the given user | 186 // Removes the user from the device. Note, it will verify that the given user |
179 // isn't the owner, so calling this method for the owner will take no effect. | 187 // isn't the owner, so calling this method for the owner will take no effect. |
180 // Note, |delegate| can be NULL. | 188 // Note, |delegate| can be NULL. |
181 virtual void RemoveUser(const AccountId& account_id, | 189 virtual void RemoveUser(const AccountId& account_id, |
182 RemoveUserDelegate* delegate) = 0; | 190 RemoveUserDelegate* delegate) = 0; |
183 | 191 |
184 // Removes the user from the persistent list only. Also removes the user's | 192 // Removes the user from the persistent list only. Also removes the user's |
185 // picture. | 193 // picture. |
186 virtual void RemoveUserFromList(const AccountId& account_id) = 0; | 194 virtual void RemoveUserFromList(const AccountId& account_id) = 0; |
187 | 195 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 static UserManager* GetForTesting(); | 399 static UserManager* GetForTesting(); |
392 | 400 |
393 // Sets UserManager instance to the given |user_manager|. | 401 // Sets UserManager instance to the given |user_manager|. |
394 // Returns the previous value of the instance. | 402 // Returns the previous value of the instance. |
395 static UserManager* SetForTesting(UserManager* user_manager); | 403 static UserManager* SetForTesting(UserManager* user_manager); |
396 }; | 404 }; |
397 | 405 |
398 } // namespace user_manager | 406 } // namespace user_manager |
399 | 407 |
400 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 408 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
OLD | NEW |