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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 1865133002: kiosk: Fix kiosk session restart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix nits 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/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 0ffe89c15a6cf6a2d13f371da299f21c65f833fa..421555fafd4eb024aafde98589332001b6e8346c 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -228,25 +228,29 @@ void ExistingUserController::UpdateLoginDisplay(
cros_settings_->GetBoolean(kAccountsPrefShowUserNamesOnSignIn,
&show_users_on_signin);
- for (user_manager::UserList::const_iterator it = users.begin();
- it != users.end();
- ++it) {
+ for (const auto& user : users) {
+ // Skip kiosk apps for login screen user list. Kiosk apps as pods (aka new
+ // kiosk UI) is currently disabled and it gets the apps directly from
+ // KioskAppManager.
+ if (user->GetType() == user_manager::USER_TYPE_KIOSK_APP)
+ continue;
+
// TODO(xiyuan): Clean user profile whose email is not in whitelist.
- bool meets_supervised_requirements =
- (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED ||
+ const bool meets_supervised_requirements =
+ user->GetType() != user_manager::USER_TYPE_SUPERVISED ||
user_manager::UserManager::Get()->AreSupervisedUsersAllowed();
- bool meets_whitelist_requirements =
- CrosSettings::IsWhitelisted((*it)->email(), nullptr) ||
- !(*it)->HasGaiaAccount();
+ const bool meets_whitelist_requirements =
+ CrosSettings::IsWhitelisted(user->email(), nullptr) ||
+ !user->HasGaiaAccount();
// Public session accounts are always shown on login screen.
- bool meets_show_users_requirements =
+ const bool meets_show_users_requirements =
show_users_on_signin ||
- (*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
+ user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
if (meets_supervised_requirements &&
meets_whitelist_requirements &&
meets_show_users_requirements) {
- filtered_users.push_back(*it);
+ filtered_users.push_back(user);
}
}

Powered by Google App Engine
This is Rietveld 408576698