Chromium Code Reviews| 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; |
| } |