| Index: chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
|
| index 36fb73cbd95c3ee4d6d2f59e567871a3338d6c80..93cc3305d723b99346a0d84f7641ab9fd7e48e99 100644
|
| --- a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
|
| +++ b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
|
| @@ -139,9 +139,16 @@ void FakeChromeUserManager::SwitchActiveUser(const AccountId& account_id) {
|
| ProfileHelper::Get()->ActiveUserHashChanged(
|
| ProfileHelper::GetUserIdHashByUserIdForTesting(
|
| account_id.GetUserEmail()));
|
| + active_user_ = nullptr;
|
| if (!users_.empty() && active_account_id_.is_valid()) {
|
| - for (user_manager::User* user : users_)
|
| - user->set_is_active(user->GetAccountId() == active_account_id_);
|
| + for (user_manager::User* const user : users_) {
|
| + if (user->GetAccountId() == active_account_id_) {
|
| + active_user_ = user;
|
| + user->set_is_active(true);
|
| + } else {
|
| + user->set_is_active(false);
|
| + }
|
| + }
|
| }
|
| }
|
|
|
|
|