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

Unified Diff: chrome/browser/chromeos/login/screens/user_selection_screen.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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/screens/user_selection_screen.h
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.h b/chrome/browser/chromeos/login/screens/user_selection_screen.h
index 7b9c684e59acae880f6298c8478ec588b96578d0..6e0d29ff8a1519df7fdf92e302419d8175744460 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.h
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.h
@@ -42,20 +42,20 @@ class UserSelectionScreen
static const user_manager::UserList PrepareUserListForSending(
const user_manager::UserList& users,
- std::string owner,
+ const user_manager::UserID& owner,
bool is_signin_to_add);
virtual void Init(const user_manager::UserList& users, bool show_guest);
const user_manager::UserList& GetUsers() const;
- void OnUserImageChanged(const user_manager::User& user);
- void OnBeforeUserRemoved(const std::string& username);
- void OnUserRemoved(const std::string& username);
+ void OnUserImageChanged(const user_manager::User& user_id);
+ void OnBeforeUserRemoved(const user_manager::UserID& user_id);
+ void OnUserRemoved(const user_manager::UserID& user_id);
void OnPasswordClearTimerExpired();
void HandleGetUsers();
- void CheckUserStatus(const std::string& user_id);
+ void CheckUserStatus(const user_manager::UserID& user_id);
// ui::UserActivityDetector implementation:
void OnUserActivity(const ui::Event* event) override;
@@ -65,28 +65,28 @@ class UserSelectionScreen
// proximity_auth::ScreenlockBridge::LockHandler implementation:
void ShowBannerMessage(const base::string16& message) override;
void ShowUserPodCustomIcon(
- const std::string& user_email,
+ const user_manager::UserID& user_id,
const proximity_auth::ScreenlockBridge::UserPodCustomIconOptions& icon)
override;
- void HideUserPodCustomIcon(const std::string& user_email) override;
+ void HideUserPodCustomIcon(const user_manager::UserID& user_id) override;
void EnableInput() override;
- void SetAuthType(const std::string& user_email,
+ void SetAuthType(const user_manager::UserID& user_id,
AuthType auth_type,
const base::string16& auth_value) override;
- AuthType GetAuthType(const std::string& user_email) const override;
+ AuthType GetAuthType(const user_manager::UserID& user_id) const override;
ScreenType GetScreenType() const override;
- void Unlock(const std::string& user_email) override;
- void AttemptEasySignin(const std::string& user_email,
+ void Unlock(const user_manager::UserID& user_id) override;
+ void AttemptEasySignin(const user_manager::UserID& user_id,
const std::string& secret,
const std::string& key_label) override;
// UserBoardModel implementation.
void SendUserList() override;
- void HardLockPod(const std::string& user_id) override;
- void AttemptEasyUnlock(const std::string& user_id) override;
- void RecordClickOnLockIcon(const std::string& user_id) override;
+ void HardLockPod(const user_manager::UserID& user_id) override;
+ void AttemptEasyUnlock(const user_manager::UserID& user_id) override;
+ void RecordClickOnLockIcon(const user_manager::UserID& user_id) override;
// Fills |user_dict| with information about |user|.
static void FillUserDictionary(
@@ -115,13 +115,13 @@ class UserSelectionScreen
UserBoardView* view_;
// Map from public session user IDs to recommended locales set by policy.
- typedef std::map<std::string, std::vector<std::string> >
+ typedef std::map<user_manager::UserID, std::vector<std::string> >
PublicSessionRecommendedLocaleMap;
PublicSessionRecommendedLocaleMap public_session_recommended_locales_;
private:
EasyUnlockService* GetEasyUnlockServiceForUser(
- const std::string& user_id) const;
+ const user_manager::UserID& user_id) const;
void OnUserStatusChecked(const user_manager::UserID& user_id,
TokenHandleUtil::TokenHandleStatus status);
@@ -137,7 +137,7 @@ class UserSelectionScreen
// Map of usernames to their current authentication type. If a user is not
// contained in the map, it is using the default authentication type.
- std::map<std::string, proximity_auth::ScreenlockBridge::LockHandler::AuthType>
+ std::map<user_manager::UserID, proximity_auth::ScreenlockBridge::LockHandler::AuthType>
user_auth_type_map_;
// Timer for measuring idle state duration before password clear.

Powered by Google App Engine
This is Rietveld 408576698