OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // UserManager implementation: | 45 // UserManager implementation: |
46 virtual void Shutdown() OVERRIDE; | 46 virtual void Shutdown() OVERRIDE; |
47 virtual UserImageManager* GetUserImageManager() OVERRIDE; | 47 virtual UserImageManager* GetUserImageManager() OVERRIDE; |
48 virtual const UserList& GetUsers() const OVERRIDE; | 48 virtual const UserList& GetUsers() const OVERRIDE; |
49 virtual const UserList& GetLoggedInUsers() const OVERRIDE; | 49 virtual const UserList& GetLoggedInUsers() const OVERRIDE; |
50 virtual void UserLoggedIn(const std::string& email, | 50 virtual void UserLoggedIn(const std::string& email, |
51 const std::string& username_hash, | 51 const std::string& username_hash, |
52 bool browser_restart) OVERRIDE; | 52 bool browser_restart) OVERRIDE; |
53 virtual void SwitchActiveUser(const std::string& email) OVERRIDE; | 53 virtual void SwitchActiveUser(const std::string& email) OVERRIDE; |
54 virtual void RetailModeUserLoggedIn() OVERRIDE; | |
55 virtual void GuestUserLoggedIn() OVERRIDE; | |
56 virtual void KioskAppLoggedIn(const std::string& username) OVERRIDE; | |
57 virtual void LocallyManagedUserLoggedIn(const std::string& username) OVERRIDE; | |
58 virtual void PublicAccountUserLoggedIn(User* user) OVERRIDE; | |
59 virtual void RegularUserLoggedIn(const std::string& email, | |
60 bool browser_restart) OVERRIDE; | |
61 virtual void RegularUserLoggedInAsEphemeral( | |
62 const std::string& email) OVERRIDE; | |
63 virtual void SessionStarted() OVERRIDE; | 54 virtual void SessionStarted() OVERRIDE; |
64 virtual void RemoveUser(const std::string& email, | 55 virtual void RemoveUser(const std::string& email, |
65 RemoveUserDelegate* delegate) OVERRIDE; | 56 RemoveUserDelegate* delegate) OVERRIDE; |
66 virtual void RemoveUserFromList(const std::string& email) OVERRIDE; | 57 virtual void RemoveUserFromList(const std::string& email) OVERRIDE; |
67 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; | 58 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; |
68 virtual const User* FindUser(const std::string& email) const OVERRIDE; | 59 virtual const User* FindUser(const std::string& email) const OVERRIDE; |
69 virtual const User* FindLocallyManagedUser( | 60 virtual const User* FindLocallyManagedUser( |
70 const string16& display_name) const OVERRIDE; | 61 const string16& display_name) const OVERRIDE; |
71 virtual const User* GetLoggedInUser() const OVERRIDE; | 62 virtual const User* GetLoggedInUser() const OVERRIDE; |
72 virtual User* GetLoggedInUser() OVERRIDE; | 63 virtual User* GetLoggedInUser() OVERRIDE; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // Same as FindUser but returns non-const pointer to User object. | 157 // Same as FindUser but returns non-const pointer to User object. |
167 User* FindUserAndModify(const std::string& email); | 158 User* FindUserAndModify(const std::string& email); |
168 | 159 |
169 // Returns the user with the given email address if found in the persistent | 160 // Returns the user with the given email address if found in the persistent |
170 // list. Returns |NULL| otherwise. | 161 // list. Returns |NULL| otherwise. |
171 const User* FindUserInList(const std::string& email) const; | 162 const User* FindUserInList(const std::string& email) const; |
172 | 163 |
173 // Same as FindUserInList but returns non-const pointer to User object. | 164 // Same as FindUserInList but returns non-const pointer to User object. |
174 User* FindUserInListAndModify(const std::string& email); | 165 User* FindUserInListAndModify(const std::string& email); |
175 | 166 |
| 167 // Indicates that a user just logged in as guest. |
| 168 void GuestUserLoggedIn(); |
| 169 |
| 170 // Indicates that a regular user just logged in. |
| 171 void RegularUserLoggedIn(const std::string& email, bool browser_restart); |
| 172 |
| 173 // Indicates that a regular user just logged in as ephemeral. |
| 174 void RegularUserLoggedInAsEphemeral(const std::string& email); |
| 175 |
| 176 // Indicates that a locally managed user just logged in. |
| 177 void LocallyManagedUserLoggedIn(const std::string& username); |
| 178 |
| 179 // Indicates that a user just logged into a public session. |
| 180 void PublicAccountUserLoggedIn(User* user); |
| 181 |
| 182 // Indicates that a kiosk app robot just logged in. |
| 183 void KioskAppLoggedIn(const std::string& app_id); |
| 184 |
| 185 // Indicates that a user just logged into a retail mode session. |
| 186 void RetailModeUserLoggedIn(); |
| 187 |
176 // Notifies that user has logged in. | 188 // Notifies that user has logged in. |
177 // Sends NOTIFICATION_LOGIN_USER_CHANGED notification. | 189 // Sends NOTIFICATION_LOGIN_USER_CHANGED notification. |
178 void NotifyOnLogin(); | 190 void NotifyOnLogin(); |
179 | 191 |
180 // Reads user's oauth token status from local state preferences. | 192 // Reads user's oauth token status from local state preferences. |
181 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const; | 193 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const; |
182 | 194 |
183 void SetCurrentUserIsOwner(bool is_current_user_owner); | 195 void SetCurrentUserIsOwner(bool is_current_user_owner); |
184 | 196 |
185 // Updates current user ownership on UI thread. | 197 // Updates current user ownership on UI thread. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 317 |
306 // Specific flows by user e-mail. | 318 // Specific flows by user e-mail. |
307 FlowMap specific_flows_; | 319 FlowMap specific_flows_; |
308 | 320 |
309 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); | 321 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); |
310 }; | 322 }; |
311 | 323 |
312 } // namespace chromeos | 324 } // namespace chromeos |
313 | 325 |
314 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ | 326 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ |
OLD | NEW |