Chromium Code Reviews| Index: chrome/browser/chromeos/login/users/fake_user_manager.cc |
| diff --git a/chrome/browser/chromeos/login/users/fake_user_manager.cc b/chrome/browser/chromeos/login/users/fake_user_manager.cc |
| index 258c0ca826a8e5dccd27a5671d0bae0df098592a..191c21a2f3ba741660c235b6287ad5d869c6a92b 100644 |
| --- a/chrome/browser/chromeos/login/users/fake_user_manager.cc |
| +++ b/chrome/browser/chromeos/login/users/fake_user_manager.cc |
| @@ -83,6 +83,8 @@ void FakeUserManager::UserLoggedIn(const std::string& email, |
| if ((*it)->username_hash() == username_hash) { |
| (*it)->set_is_logged_in(true); |
| logged_in_users_.push_back(*it); |
| + (*it)->set_is_active(true); |
|
dzhioev (left Google)
2014/07/23 11:02:20
Same true for these lines. Could you please rebase
michaelpg
2014/07/25 23:49:08
Done and done.
|
| + active_user_id_ = (*it)->email(); |
| if (!primary_user_) |
| primary_user_ = *it; |
| @@ -115,6 +117,13 @@ User* FakeUserManager::GetActiveUser() { |
| void FakeUserManager::SwitchActiveUser(const std::string& email) { |
| active_user_id_ = email; |
| + if (user_list_.size() && !active_user_id_.empty()) { |
| + for (UserList::const_iterator it = user_list_.begin(); |
| + it != user_list_.end(); ++it) { |
| + if ((*it)->email() == active_user_id_) |
| + (*it)->set_is_active(true); |
|
dzhioev (left Google)
2014/07/24 20:31:34
Currently active user should be marked as inactive
michaelpg
2014/07/25 23:49:08
Done.
|
| + } |
| + } |
| } |
| void FakeUserManager::SaveUserDisplayName( |