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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.cc

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/lock/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc
index 2bf45b9e64618e60ae2ddc3c230ac659448f5775..2621a5d49d77938626b9449cfa822db15f7f6812 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
@@ -287,12 +287,12 @@ void ScreenLocker::Authenticate(const UserContext& user_context) {
}
const user_manager::User* ScreenLocker::FindUnlockUser(
- const std::string& user_id) {
+ const user_manager::UserID& user_id) {
const user_manager::User* unlock_user = NULL;
for (user_manager::UserList::const_iterator it = users_.begin();
it != users_.end();
++it) {
- if ((*it)->email() == user_id) {
+ if ((*it)->GetUserID() == user_id) {
unlock_user = *it;
break;
}
@@ -501,11 +501,11 @@ content::WebUI* ScreenLocker::GetAssociatedWebUI() {
return delegate_->GetAssociatedWebUI();
}
-bool ScreenLocker::IsUserLoggedIn(const std::string& username) {
+bool ScreenLocker::IsUserLoggedIn(const user_manager::UserID& user_id) {
for (user_manager::UserList::const_iterator it = users_.begin();
it != users_.end();
++it) {
- if ((*it)->email() == username)
+ if ((*it)->GetUserID() == user_id)
return true;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698