Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Unified Diff: chrome/browser/chromeos/login/user_manager.h

Issue 8773046: [cros] Display emails of users are stored in a separate dictionary in Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698