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_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/chromeos/base/locale_util.h" | 10 #include "chrome/browser/chromeos/base/locale_util.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 virtual void RemoveUserFromList(const std::string& user_id) = 0; | 167 virtual void RemoveUserFromList(const std::string& user_id) = 0; |
168 | 168 |
169 // Returns true if a user with the given user id is found in the persistent | 169 // Returns true if a user with the given user id is found in the persistent |
170 // list or currently logged in as ephemeral. | 170 // list or currently logged in as ephemeral. |
171 virtual bool IsKnownUser(const std::string& user_id) const = 0; | 171 virtual bool IsKnownUser(const std::string& user_id) const = 0; |
172 | 172 |
173 // Returns the user with the given user id if found in the persistent | 173 // Returns the user with the given user id if found in the persistent |
174 // list or currently logged in as ephemeral. Returns |NULL| otherwise. | 174 // list or currently logged in as ephemeral. Returns |NULL| otherwise. |
175 virtual const User* FindUser(const std::string& user_id) const = 0; | 175 virtual const User* FindUser(const std::string& user_id) const = 0; |
176 | 176 |
| 177 // Returns the user with the given user id if found in the persistent |
| 178 // list or currently logged in as ephemeral. Returns |NULL| otherwise. |
| 179 // Same as FindUser but returns non-const pointer to User object. |
| 180 virtual User* FindUserAndModify(const std::string& user_id) = 0; |
| 181 |
177 // Returns the logged-in user. | 182 // Returns the logged-in user. |
178 // TODO(nkostylev): Deprecate this call, move clients to GetActiveUser(). | 183 // TODO(nkostylev): Deprecate this call, move clients to GetActiveUser(). |
179 // http://crbug.com/230852 | 184 // http://crbug.com/230852 |
180 virtual const User* GetLoggedInUser() const = 0; | 185 virtual const User* GetLoggedInUser() const = 0; |
181 virtual User* GetLoggedInUser() = 0; | 186 virtual User* GetLoggedInUser() = 0; |
182 | 187 |
183 // Returns the logged-in user that is currently active within this session. | 188 // Returns the logged-in user that is currently active within this session. |
184 // There could be multiple users logged in at the the same but for now | 189 // There could be multiple users logged in at the the same but for now |
185 // we support only one of them being active. | 190 // we support only one of them being active. |
186 virtual const User* GetActiveUser() const = 0; | 191 virtual const User* GetActiveUser() const = 0; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 ScopedTestUserManager(); | 369 ScopedTestUserManager(); |
365 ~ScopedTestUserManager(); | 370 ~ScopedTestUserManager(); |
366 | 371 |
367 private: | 372 private: |
368 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); | 373 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); |
369 }; | 374 }; |
370 | 375 |
371 } // namespace chromeos | 376 } // namespace chromeos |
372 | 377 |
373 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 378 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
OLD | NEW |