Chromium Code Reviews| Index: chrome/browser/chromeos/login/user_manager.h |
| diff --git a/chrome/browser/chromeos/login/user_manager.h b/chrome/browser/chromeos/login/user_manager.h |
| index 08efd2645a416d347edd950b4351c385b5295fab..e9e5734781705851f17cc28aafaa5ec9ca46faaa 100644 |
| --- a/chrome/browser/chromeos/login/user_manager.h |
| +++ b/chrome/browser/chromeos/login/user_manager.h |
| @@ -31,7 +31,16 @@ template<typename> struct DefaultLazyInstanceTraits; |
| namespace chromeos { |
| -class RemoveUserDelegate; |
| +// Delegate to be used while user removing. |
|
whywhat
2011/12/05 12:14:49
nit: Move to a separate header
Ivan Korotkov
2011/12/05 14:12:48
Done.
|
| +class RemoveUserDelegate { |
| + public: |
| + // Called right before actual user removal process is initiated. |
| + virtual void OnBeforeUserRemoved(const std::string& username) = 0; |
| + |
| + // Called right after user removal process has been initiated. |
| + virtual void OnUserRemoved(const std::string& username) = 0; |
| +}; |
| + |
| // This class provides a mechanism for discovering users who have logged |
| // into this chromium os device before and updating that list. |
| @@ -83,8 +92,17 @@ class UserManager : public ProfileDownloaderDelegate, |
| void SaveUserOAuthStatus(const std::string& username, |
| User::OAuthTokenStatus oauth_token_status); |
| - // Gets user's oauth token status in local state preferences. |
| - User::OAuthTokenStatus GetUserOAuthStatus(const std::string& username) const; |
| + // Save user's displayed (non-canonical) email in local state preferences. |
| + // If |update_if_exists| is false and a display name for |username| already |
| + // exists, does nothing. |
| + void SaveUserDisplayEmail(const std::string& username, |
| + const std::string& display_email, |
| + bool update_if_exists); |
| + |
| + // Returns the display email for user |username| if it is known (was |
| + // previously set by a |SaveUserDisplayEmail| call). |
| + // Otherwise, returns |username| itself. |
| + std::string GetUserDisplayEmail(const std::string& username) const; |
| // Sets user image to the default image with index |image_index|, sends |
| // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| @@ -169,6 +187,9 @@ class UserManager : public ProfileDownloaderDelegate, |
| // Notifies on new user session. |
| void NotifyOnLogin(); |
| + // Reads user's oauth token status from local state preferences. |
| + User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const; |
| + |
| // Sets one of the default images for the specified user and saves this |
| // setting in local state. |
| // Does not send LOGIN_USER_IMAGE_CHANGED notification. |