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

Unified Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 2107353002: Fix the flaky test KioskTest.LaunchAppUserCancel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UI_STATE_UNKNOWN Created 4 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 88971eaa06931cc1a1245d12e71b10a0fe8e1226..c58838a3a8ef4dc92d4ed0497819f83797d806e7 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -919,17 +919,28 @@ void SigninScreenHandler::OnPreferencesChanged() {
return;
}
- // Send the updated user list to the UI.
- if (delegate_)
- delegate_->HandleGetUsers();
+ preferences_changed_delayed_ = false;
+
+ if (!delegate_)
+ return;
- if (delegate_ && !delegate_->IsShowUsers()) {
+ // Send the updated user list to the UI.
+ delegate_->HandleGetUsers();
+ if (GetCurrentScreen() == OobeScreen::SCREEN_ACCOUNT_PICKER &&
+ delegate_->ShowUsersHasChanged() &&
+ !delegate_->IsShowUsers()) {
+ // We are at the account picker screen and the POD setting has changed
+ // to be disabled. We need to show the add user page.
HandleShowAddUser(nullptr);
- } else {
- UpdateUIState(UI_STATE_ACCOUNT_PICKER, nullptr);
+ return;
}
- preferences_changed_delayed_ = false;
+ if (delegate_->AllowNewUserChanged() || ui_state_ == UI_STATE_UNKNOWN) {
+ // We need to reload GAIA if UI_STATE_UNKNOWN or the allow new user setting
+ // has changed so that reloaded GAIA shows/hides the option to create a new
+ // account.
+ UpdateUIState(UI_STATE_ACCOUNT_PICKER, nullptr);
+ }
}
void SigninScreenHandler::ResetSigninScreenHandlerDelegate() {
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698