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

Unified Diff: chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc

Issue 1922143002: Disabled ARC for ephemeral users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 8 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/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);
+ }
+ }
}
}
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service_unittest.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698