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

Unified Diff: components/user_manager/fake_user_manager.cc

Issue 2450183002: Rename UserInfo method GetEmail to GetDisplayEmail. (Closed)
Patch Set: Fixed build in a dependent CL. Created 4 years, 2 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: components/user_manager/fake_user_manager.cc
diff --git a/components/user_manager/fake_user_manager.cc b/components/user_manager/fake_user_manager.cc
index 10e0d26dcdd93b2fbd81da0b71957e6938de99cb..564687dacea2f1234c23a5ec99f997e33bdefea8 100644
--- a/components/user_manager/fake_user_manager.cc
+++ b/components/user_manager/fake_user_manager.cc
@@ -54,9 +54,7 @@ const user_manager::User* FakeUserManager::AddUserWithAffiliation(
void FakeUserManager::RemoveUserFromList(const AccountId& account_id) {
user_manager::UserList::iterator it = users_.begin();
- // TODO (alemate): Chenge this to GetAccountId(), once a real AccountId is
- // passed. crbug.com/546876
- while (it != users_.end() && (*it)->GetEmail() != account_id.GetUserEmail())
+ while (it != users_.end() && (*it)->GetAccountId() != account_id)
oshima 2016/10/26 15:14:44 optional: or use std::find_if
Alexander Alekseev 2016/10/27 18:11:37 Done.
++it;
if (it != users_.end()) {
if (primary_user_ == *it)
@@ -134,9 +132,7 @@ void FakeUserManager::SaveUserDisplayName(const AccountId& account_id,
const base::string16& display_name) {
for (user_manager::UserList::iterator it = users_.begin(); it != users_.end();
++it) {
- // TODO (alemate): Chenge this to GetAccountId(), once a real AccountId is
- // passed. crbug.com/546876
- if ((*it)->GetEmail() == account_id.GetUserEmail()) {
+ if ((*it)->GetAccountId() == account_id) {
(*it)->set_display_name(display_name);
return;
}

Powered by Google App Engine
This is Rietveld 408576698