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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // |browser_restart| is true when reloading Chrome after crash to distinguish | 138 // |browser_restart| is true when reloading Chrome after crash to distinguish |
139 // from normal sign in flow. | 139 // from normal sign in flow. |
140 // |username_hash| is used to identify homedir mount point. | 140 // |username_hash| is used to identify homedir mount point. |
141 virtual void UserLoggedIn(const std::string& user_id, | 141 virtual void UserLoggedIn(const std::string& user_id, |
142 const std::string& username_hash, | 142 const std::string& username_hash, |
143 bool browser_restart) = 0; | 143 bool browser_restart) = 0; |
144 | 144 |
145 // Switches to active user identified by |user_id|. User has to be logged in. | 145 // Switches to active user identified by |user_id|. User has to be logged in. |
146 virtual void SwitchActiveUser(const std::string& user_id) = 0; | 146 virtual void SwitchActiveUser(const std::string& user_id) = 0; |
147 | 147 |
| 148 // Switches to the last active user (called after crash happens and session |
| 149 // restore has completed). |
| 150 virtual void SwitchToLastActiveUser() = 0; |
| 151 |
148 // Called when browser session is started i.e. after | 152 // Called when browser session is started i.e. after |
149 // browser_creator.LaunchBrowser(...) was called after user sign in. | 153 // browser_creator.LaunchBrowser(...) was called after user sign in. |
150 // When user is at the image screen IsUserLoggedIn() will return true | 154 // When user is at the image screen IsUserLoggedIn() will return true |
151 // but IsSessionStarted() will return false. During the kiosk splash screen, | 155 // but IsSessionStarted() will return false. During the kiosk splash screen, |
152 // we perform additional initialization after the user is logged in but | 156 // we perform additional initialization after the user is logged in but |
153 // before the session has been started. | 157 // before the session has been started. |
154 // Fires NOTIFICATION_SESSION_STARTED. | 158 // Fires NOTIFICATION_SESSION_STARTED. |
155 virtual void SessionStarted() = 0; | 159 virtual void SessionStarted() = 0; |
156 | 160 |
157 // Removes the user from the device. Note, it will verify that the given user | 161 // Removes the user from the device. Note, it will verify that the given user |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 static UserManager* GetForTesting(); | 314 static UserManager* GetForTesting(); |
311 | 315 |
312 // Sets UserManager instance to the given |user_manager|. | 316 // Sets UserManager instance to the given |user_manager|. |
313 // Returns the previous value of the instance. | 317 // Returns the previous value of the instance. |
314 static UserManager* SetForTesting(UserManager* user_manager); | 318 static UserManager* SetForTesting(UserManager* user_manager); |
315 }; | 319 }; |
316 | 320 |
317 } // namespace user_manager | 321 } // namespace user_manager |
318 | 322 |
319 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 323 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
OLD | NEW |