| 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/login/user.h" | 10 #include "chrome/browser/chromeos/login/user.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // http://crbug.com/230852 | 192 // http://crbug.com/230852 |
| 193 virtual const User* GetLoggedInUser() const = 0; | 193 virtual const User* GetLoggedInUser() const = 0; |
| 194 virtual User* GetLoggedInUser() = 0; | 194 virtual User* GetLoggedInUser() = 0; |
| 195 | 195 |
| 196 // Returns the logged-in user that is currently active within this session. | 196 // Returns the logged-in user that is currently active within this session. |
| 197 // There could be multiple users logged in at the the same but for now | 197 // There could be multiple users logged in at the the same but for now |
| 198 // we support only one of them being active. | 198 // we support only one of them being active. |
| 199 virtual const User* GetActiveUser() const = 0; | 199 virtual const User* GetActiveUser() const = 0; |
| 200 virtual User* GetActiveUser() = 0; | 200 virtual User* GetActiveUser() = 0; |
| 201 | 201 |
| 202 // Returns primary user. There could be multiple users logged in at the |
| 203 // same time, but only the first one defines locale and other login session |
| 204 // parameters. |
| 205 virtual const User* GetPrimaryUser() const = 0; |
| 206 |
| 202 // Saves user's oauth token status in local state preferences. | 207 // Saves user's oauth token status in local state preferences. |
| 203 virtual void SaveUserOAuthStatus( | 208 virtual void SaveUserOAuthStatus( |
| 204 const std::string& username, | 209 const std::string& username, |
| 205 User::OAuthTokenStatus oauth_token_status) = 0; | 210 User::OAuthTokenStatus oauth_token_status) = 0; |
| 206 | 211 |
| 207 // Saves user's displayed name in local state preferences. | 212 // Saves user's displayed name in local state preferences. |
| 208 // Ignored If there is no such user. | 213 // Ignored If there is no such user. |
| 209 virtual void SaveUserDisplayName(const std::string& username, | 214 virtual void SaveUserDisplayName(const std::string& username, |
| 210 const string16& display_name) = 0; | 215 const string16& display_name) = 0; |
| 211 | 216 |
| 217 // Updates data upon User Account download. |
| 218 virtual void UpdateUserAccountData(const std::string& username, |
| 219 const string16& display_name, |
| 220 const std::string& locale) = 0; |
| 221 |
| 212 // Returns the display name for user |username| if it is known (was | 222 // Returns the display name for user |username| if it is known (was |
| 213 // previously set by a |SaveUserDisplayName| call). | 223 // previously set by a |SaveUserDisplayName| call). |
| 214 // Otherwise, returns an empty string. | 224 // Otherwise, returns an empty string. |
| 215 virtual string16 GetUserDisplayName( | 225 virtual string16 GetUserDisplayName( |
| 216 const std::string& username) const = 0; | 226 const std::string& username) const = 0; |
| 217 | 227 |
| 218 // Saves user's displayed (non-canonical) email in local state preferences. | 228 // Saves user's displayed (non-canonical) email in local state preferences. |
| 219 // Ignored If there is no such user. | 229 // Ignored If there is no such user. |
| 220 virtual void SaveUserDisplayEmail(const std::string& username, | 230 virtual void SaveUserDisplayEmail(const std::string& username, |
| 221 const std::string& display_email) = 0; | 231 const std::string& display_email) = 0; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 ScopedTestUserManager(); | 399 ScopedTestUserManager(); |
| 390 ~ScopedTestUserManager(); | 400 ~ScopedTestUserManager(); |
| 391 | 401 |
| 392 private: | 402 private: |
| 393 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); | 403 DISALLOW_COPY_AND_ASSIGN(ScopedTestUserManager); |
| 394 }; | 404 }; |
| 395 | 405 |
| 396 } // namespace chromeos | 406 } // namespace chromeos |
| 397 | 407 |
| 398 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 408 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |