Commit 491ee634 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

CrOS OOBE: Nuke ShowSigninUI from C++ side

Use ShowGaiaDialog instead.

Bug: none
Change-Id: I645e5b1d1c013dc1597a4f5291f10429a834c147
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536633
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828652}
parent 93ce5606
...@@ -826,7 +826,7 @@ void ExistingUserController::ContinuePerformLoginWithoutMigration( ...@@ -826,7 +826,7 @@ void ExistingUserController::ContinuePerformLoginWithoutMigration(
void ExistingUserController::RestartLogin(const UserContext& user_context) { void ExistingUserController::RestartLogin(const UserContext& user_context) {
is_login_in_progress_ = false; is_login_in_progress_ = false;
login_performer_.reset(); login_performer_.reset();
GetLoginDisplay()->ShowSigninUI(user_context.GetAccountId().GetUserEmail()); GetLoginDisplayHost()->ShowGaiaDialog(user_context.GetAccountId());
} }
void ExistingUserController::OnSigninScreenReady() { void ExistingUserController::OnSigninScreenReady() {
...@@ -1264,7 +1264,7 @@ void ExistingUserController::ForceOnlineLoginForAccountId( ...@@ -1264,7 +1264,7 @@ void ExistingUserController::ForceOnlineLoginForAccountId(
// Start online sign-in UI for the user. // Start online sign-in UI for the user.
is_login_in_progress_ = false; is_login_in_progress_ = false;
login_performer_.reset(); login_performer_.reset();
GetLoginDisplay()->ShowSigninUI(account_id.GetUserEmail()); GetLoginDisplayHost()->ShowGaiaDialog(account_id);
} }
void ExistingUserController::AllowlistCheckFailed(const std::string& email) { void ExistingUserController::AllowlistCheckFailed(const std::string& email) {
......
...@@ -91,9 +91,6 @@ class LoginDisplay { ...@@ -91,9 +91,6 @@ class LoginDisplay {
virtual void ShowPasswordChangedDialog(bool show_password_error, virtual void ShowPasswordChangedDialog(bool show_password_error,
const AccountId& account_id) = 0; const AccountId& account_id) = 0;
// Shows signin UI with specified email.
virtual void ShowSigninUI(const std::string& email) = 0;
// Show allowlist check failed error. Happens after user completes online // Show allowlist check failed error. Happens after user completes online
// signin but allowlist check fails. // signin but allowlist check fails.
virtual void ShowAllowlistCheckFailedError() = 0; virtual void ShowAllowlistCheckFailedError() = 0;
......
...@@ -142,12 +142,6 @@ void LoginDisplayHostMojo::ShowAllowlistCheckFailedError() { ...@@ -142,12 +142,6 @@ void LoginDisplayHostMojo::ShowAllowlistCheckFailedError() {
ShowDialog(); ShowDialog();
} }
void LoginDisplayHostMojo::ShowSigninUI(const std::string& email) {
DCHECK(GetOobeUI());
GetOobeUI()->signin_screen_handler()->ShowSigninUI(email);
ShowDialog();
}
void LoginDisplayHostMojo::HandleDisplayCaptivePortal() { void LoginDisplayHostMojo::HandleDisplayCaptivePortal() {
if (dialog_->IsVisible()) if (dialog_->IsVisible())
GetOobeUI()->GetErrorScreen()->FixCaptivePortal(); GetOobeUI()->GetErrorScreen()->FixCaptivePortal();
......
...@@ -65,9 +65,6 @@ class LoginDisplayHostMojo : public LoginDisplayHostCommon, ...@@ -65,9 +65,6 @@ class LoginDisplayHostMojo : public LoginDisplayHostCommon,
// signin but allowlist check fails. // signin but allowlist check fails.
void ShowAllowlistCheckFailedError(); void ShowAllowlistCheckFailedError();
// Shows signin UI with specified email.
void ShowSigninUI(const std::string& email);
UserSelectionScreen* user_selection_screen() { UserSelectionScreen* user_selection_screen() {
return user_selection_screen_.get(); return user_selection_screen_.get();
} }
......
...@@ -201,10 +201,6 @@ void LoginDisplayMojo::ShowPasswordChangedDialog(bool show_password_error, ...@@ -201,10 +201,6 @@ void LoginDisplayMojo::ShowPasswordChangedDialog(bool show_password_error,
host_->ShowPasswordChangedDialog(show_password_error, account_id); host_->ShowPasswordChangedDialog(show_password_error, account_id);
} }
void LoginDisplayMojo::ShowSigninUI(const std::string& email) {
host_->ShowSigninUI(email);
}
void LoginDisplayMojo::ShowAllowlistCheckFailedError() { void LoginDisplayMojo::ShowAllowlistCheckFailedError() {
host_->ShowAllowlistCheckFailedError(); host_->ShowAllowlistCheckFailedError();
} }
......
...@@ -44,7 +44,6 @@ class LoginDisplayMojo : public LoginDisplay, ...@@ -44,7 +44,6 @@ class LoginDisplayMojo : public LoginDisplay,
HelpAppLauncher::HelpTopic help_topic_id) override; HelpAppLauncher::HelpTopic help_topic_id) override;
void ShowPasswordChangedDialog(bool show_password_error, void ShowPasswordChangedDialog(bool show_password_error,
const AccountId& account_id) override; const AccountId& account_id) override;
void ShowSigninUI(const std::string& email) override;
void ShowAllowlistCheckFailedError() override; void ShowAllowlistCheckFailedError() override;
// SigninScreenHandlerDelegate: // SigninScreenHandlerDelegate:
......
...@@ -173,11 +173,6 @@ void LoginDisplayWebUI::ShowPasswordChangedDialog(bool show_password_error, ...@@ -173,11 +173,6 @@ void LoginDisplayWebUI::ShowPasswordChangedDialog(bool show_password_error,
NOTIMPLEMENTED(); NOTIMPLEMENTED();
} }
void LoginDisplayWebUI::ShowSigninUI(const std::string& email) {
if (webui_handler_)
webui_handler_->ShowSigninUI(email);
}
void LoginDisplayWebUI::ShowAllowlistCheckFailedError() { void LoginDisplayWebUI::ShowAllowlistCheckFailedError() {
if (webui_handler_) if (webui_handler_)
webui_handler_->ShowAllowlistCheckFailedError(); webui_handler_->ShowAllowlistCheckFailedError();
......
...@@ -44,7 +44,6 @@ class LoginDisplayWebUI : public LoginDisplay, ...@@ -44,7 +44,6 @@ class LoginDisplayWebUI : public LoginDisplay,
HelpAppLauncher::HelpTopic help_topic_id) override; HelpAppLauncher::HelpTopic help_topic_id) override;
void ShowPasswordChangedDialog(bool show_password_error, void ShowPasswordChangedDialog(bool show_password_error,
const AccountId& account_id) override; const AccountId& account_id) override;
void ShowSigninUI(const std::string& email) override;
void ShowAllowlistCheckFailedError() override; void ShowAllowlistCheckFailedError() override;
// SigninScreenHandlerDelegate implementation: // SigninScreenHandlerDelegate implementation:
......
...@@ -179,10 +179,6 @@ void CoreOobeHandler::ShowEnableAdbSideloadingScreen() { ...@@ -179,10 +179,6 @@ void CoreOobeHandler::ShowEnableAdbSideloadingScreen() {
EnableAdbSideloadingScreenView::kScreenId); EnableAdbSideloadingScreenView::kScreenId);
} }
void CoreOobeHandler::ShowSignInUI(const std::string& email) {
CallJS("cr.ui.Oobe.showSigninUI", email);
}
void CoreOobeHandler::ResetSignInUI(bool force_online) { void CoreOobeHandler::ResetSignInUI(bool force_online) {
CallJS("cr.ui.Oobe.resetSigninUI", force_online); CallJS("cr.ui.Oobe.resetSigninUI", force_online);
} }
......
...@@ -54,7 +54,6 @@ class CoreOobeView { ...@@ -54,7 +54,6 @@ class CoreOobeView {
const std::string& error_text, const std::string& error_text,
const std::string& help_link_text, const std::string& help_link_text,
HelpAppLauncher::HelpTopic help_topic_id) = 0; HelpAppLauncher::HelpTopic help_topic_id) = 0;
virtual void ShowSignInUI(const std::string& email) = 0;
virtual void ResetSignInUI(bool force_online) = 0; virtual void ResetSignInUI(bool force_online) = 0;
virtual void ClearUserPodPassword() = 0; virtual void ClearUserPodPassword() = 0;
virtual void RefocusCurrentPod() = 0; virtual void RefocusCurrentPod() = 0;
...@@ -127,7 +126,6 @@ class CoreOobeHandler : public BaseWebUIHandler, ...@@ -127,7 +126,6 @@ class CoreOobeHandler : public BaseWebUIHandler,
const std::string& error_text, const std::string& error_text,
const std::string& help_link_text, const std::string& help_link_text,
HelpAppLauncher::HelpTopic help_topic_id) override; HelpAppLauncher::HelpTopic help_topic_id) override;
void ShowSignInUI(const std::string& email) override;
void ResetSignInUI(bool force_online) override; void ResetSignInUI(bool force_online) override;
void ClearUserPodPassword() override; void ClearUserPodPassword() override;
void RefocusCurrentPod() override; void RefocusCurrentPod() override;
......
...@@ -878,10 +878,6 @@ void SigninScreenHandler::ShowError(int login_attempts, ...@@ -878,10 +878,6 @@ void SigninScreenHandler::ShowError(int login_attempts,
help_topic_id); help_topic_id);
} }
void SigninScreenHandler::ShowSigninUI(const std::string& email) {
core_oobe_view_->ShowSignInUI(email);
}
void SigninScreenHandler::ShowAllowlistCheckFailedError() { void SigninScreenHandler::ShowAllowlistCheckFailedError() {
gaia_screen_handler_->ShowAllowlistCheckFailedError(); gaia_screen_handler_->ShowAllowlistCheckFailedError();
} }
......
...@@ -71,7 +71,6 @@ class LoginDisplayWebUIHandler { ...@@ -71,7 +71,6 @@ class LoginDisplayWebUIHandler {
const std::string& error_text, const std::string& error_text,
const std::string& help_link_text, const std::string& help_link_text,
HelpAppLauncher::HelpTopic help_topic_id) = 0; HelpAppLauncher::HelpTopic help_topic_id) = 0;
virtual void ShowSigninUI(const std::string& email) = 0;
virtual void ShowAllowlistCheckFailedError() = 0; virtual void ShowAllowlistCheckFailedError() = 0;
virtual void LoadUsers(const user_manager::UserList& users, virtual void LoadUsers(const user_manager::UserList& users,
const base::ListValue& users_list) = 0; const base::ListValue& users_list) = 0;
...@@ -237,7 +236,6 @@ class SigninScreenHandler ...@@ -237,7 +236,6 @@ class SigninScreenHandler
const std::string& error_text, const std::string& error_text,
const std::string& help_link_text, const std::string& help_link_text,
HelpAppLauncher::HelpTopic help_topic_id) override; HelpAppLauncher::HelpTopic help_topic_id) override;
void ShowSigninUI(const std::string& email) override;
void ShowAllowlistCheckFailedError() override; void ShowAllowlistCheckFailedError() override;
void LoadUsers(const user_manager::UserList& users, void LoadUsers(const user_manager::UserList& users,
const base::ListValue& users_list) override; const base::ListValue& users_list) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment