diff options
author | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 17:28:29 +0000 |
---|---|---|
committer | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 17:28:29 +0000 |
commit | 548f060e7619df2c4683f59f5a3a181ffe4b1e9e (patch) | |
tree | 507c62da0913ca249f7c33999eab24f4d98106ab | |
parent | 2287e1d79d00a533ad657b64455f76806706c025 (diff) | |
download | chromium_src-548f060e7619df2c4683f59f5a3a181ffe4b1e9e.zip chromium_src-548f060e7619df2c4683f59f5a3a181ffe4b1e9e.tar.gz chromium_src-548f060e7619df2c4683f59f5a3a181ffe4b1e9e.tar.bz2 |
Merge 168209 - Add UI for MOUNT_ERROR_TPM_NEEDS_REBOOT
BUG=chromium-os:35966
TEST=Tested with cryptohome patch (see issue).
TBR=sky
Review URL: https://codereview.chromium.org/11417008
TBR=nkostylev@chromium.org
Review URL: https://codereview.chromium.org/11348155
git-svn-id: svn://svn.chromium.org/chrome/branches/1271/src@168825 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed, 204 insertions, 2 deletions
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd index 44a7c17..1884aeb 100644 --- a/chrome/app/theme/theme_resources.grd +++ b/chrome/app/theme/theme_resources.grd @@ -147,6 +147,9 @@ <structure type="chrome_scaled_image" name="IDR_CONTROLLED_SETTING_RECOMMENDED_LARGE" file="controlled_setting_recommended_large.png" /> <structure type="chrome_scaled_image" name="IDR_COOKIE_ICON" file="cookie.png" /> <structure type="chrome_scaled_image" name="IDR_COOKIE_STORAGE_ICON" file="cookie_storage.png" /> + <if expr="pp_ifdef('chromeos')"> + <structure type="chrome_scaled_image" name="IDR_CRITICAL_ERROR" file="cros/critical_error.png" /> + </if> <structure type="chrome_scaled_image" name="IDR_CWS_STAR_EMPTY" file="cws_star_empty.png" /> <structure type="chrome_scaled_image" name="IDR_CWS_STAR_FULL" file="cws_star_full.png" /> <structure type="chrome_scaled_image" name="IDR_CWS_STAR_HALF" file="cws_star_half.png" /> diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index 7134474..6f6a298 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -44,6 +44,7 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "chromeos/dbus/dbus_thread_manager.h" +#include "chromeos/dbus/power_manager_client.h" #include "chromeos/dbus/session_manager_client.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" @@ -101,6 +102,9 @@ const long int kAuthCacheTransferDelayMs = 2000; // Delay for restarting the ui if safe-mode login has failed. const long int kSafeModeRestartUiDelayMs = 30000; +// Delay for rebooting machine if TPM critical error was encountered. +const long int kCriticalErrorRebootDelayMs = 3500; + // Makes a call to the policy subsystem to reload the policy when we detect // authentication change. void RefreshPoliciesOnUIThread() { @@ -522,6 +526,20 @@ void ExistingUserController::ShowResetScreen() { login_display_->OnFadeOut(); } +void ExistingUserController::ShowTPMErrorAndScheduleReboot() { + login_display_->SetUIEnabled(false); + login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); + reboot_timer_.Start( + FROM_HERE, + base::TimeDelta::FromMilliseconds(kCriticalErrorRebootDelayMs), + this, + &ExistingUserController::OnRebootTimeElapsed); +} + +void ExistingUserController::OnRebootTimeElapsed() { + chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); +} + //////////////////////////////////////////////////////////////////////////////// // ExistingUserController, LoginPerformer::Delegate implementation: // @@ -541,6 +559,8 @@ void ExistingUserController::OnLoginFailure(const LoginFailure& failure) { base::Unretained(DBusThreadManager::Get()-> GetSessionManagerClient())), base::TimeDelta::FromMilliseconds(kSafeModeRestartUiDelayMs)); + } else if (failure.reason() == LoginFailure::TPM_ERROR) { + ShowTPMErrorAndScheduleReboot(); } else if (!online_succeeded_for_.empty()) { ShowGaiaPasswordChanged(online_succeeded_for_); } else { diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h index 7e392b2..1484cf6 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.h +++ b/chrome/browser/chromeos/login/existing_user_controller.h @@ -163,6 +163,12 @@ class ExistingUserController : public LoginDisplay::Delegate, // Shows "reset device" screen. void ShowResetScreen(); + // Shows "critical TPM error" screen and starts reboot timer. + void ShowTPMErrorAndScheduleReboot(); + + // Reboot timer handler. + void OnRebootTimeElapsed(); + // Invoked to complete login. Login might be suspended if auto-enrollment // has to be performed, and will resume once auto-enrollment completes. void CompleteLoginInternal(std::string username, std::string password); @@ -257,6 +263,9 @@ class ExistingUserController : public LoginDisplay::Delegate, // from showing the screen until a successful login is performed. base::Time time_init_; + // Timer for the interval to wait for the reboot after TPM error UI was shown. + base::OneShotTimer<ExistingUserController> reboot_timer_; + FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); DISALLOW_COPY_AND_ASSIGN(ExistingUserController); diff --git a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc index 280169f..4fccb99 100644 --- a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc +++ b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc @@ -64,6 +64,7 @@ class MockLoginDisplay : public LoginDisplay { MOCK_METHOD1(SetUIEnabled, void(bool)); MOCK_METHOD1(SelectPod, void(int)); MOCK_METHOD3(ShowError, void(int, int, HelpAppLauncher::HelpTopic)); + MOCK_METHOD1(ShowErrorScreen, void(LoginDisplay::SigninError)); MOCK_METHOD1(ShowGaiaPasswordChanged, void(const std::string&)); MOCK_METHOD1(OnBeforeUserRemoved, void(const std::string&)); MOCK_METHOD1(OnUserRemoved, void(const std::string&)); diff --git a/chrome/browser/chromeos/login/login_display.h b/chrome/browser/chromeos/login/login_display.h index 42f60ef..f42c25c 100644 --- a/chrome/browser/chromeos/login/login_display.h +++ b/chrome/browser/chromeos/login/login_display.h @@ -22,6 +22,13 @@ namespace chromeos { // An abstract class that defines login UI implementation. class LoginDisplay : public RemoveUserDelegate { public: + // Sign in error IDs that require detailed error screen and not just + // a simple error bubble. + enum SigninError { + // Shown in case of critical TPM error. + TPM_ERROR, + }; + class Delegate { public: // Create new Google account. @@ -100,13 +107,16 @@ class LoginDisplay : public RemoveUserDelegate { // Does nothing if current user is already selected. virtual void SelectPod(int index) = 0; - // Displays error with |error_msg_id| specified. + // Displays simple error bubble with |error_msg_id| specified. // |login_attempts| shows number of login attempts made by current user. // |help_topic_id| is additional help topic that is presented as link. virtual void ShowError(int error_msg_id, int login_attempts, HelpAppLauncher::HelpTopic help_topic_id) = 0; + // Displays detailed error screen for error with ID |error_id|. + virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0; + // Proceed with Gaia flow because password has changed. virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; diff --git a/chrome/browser/chromeos/login/login_status_consumer.h b/chrome/browser/chromeos/login/login_status_consumer.h index af9c4ad..be2678f 100644 --- a/chrome/browser/chromeos/login/login_status_consumer.h +++ b/chrome/browser/chromeos/login/login_status_consumer.h @@ -31,6 +31,7 @@ class LoginFailure { // passed to the login_status_consumer_ in tests // only. It is never generated or seen by any of the // other authenticator classes. + TPM_ERROR, // Critical TPM error encountered. NUM_FAILURE_REASONS, // This has to be the last item. }; diff --git a/chrome/browser/chromeos/login/parallel_authenticator.cc b/chrome/browser/chromeos/login/parallel_authenticator.cc index ef57bc9..b153cd1 100644 --- a/chrome/browser/chromeos/login/parallel_authenticator.cc +++ b/chrome/browser/chromeos/login/parallel_authenticator.cc @@ -490,6 +490,15 @@ void ParallelAuthenticator::Resolve() { base::Bind(&ParallelAuthenticator::OnLoginFailure, this, LoginFailure(LoginFailure::COULD_NOT_MOUNT_TMPFS))); break; + case FAILED_TPM: + // In this case, we tried to create/mount cryptohome and failed + // because of the critical TPM error. + // Chrome will notify user and request reboot. + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + base::Bind(&ParallelAuthenticator::OnLoginFailure, this, + LoginFailure(LoginFailure::TPM_ERROR))); + break; case CREATE_NEW: create = true; case RECOVER_MOUNT: @@ -696,6 +705,12 @@ ParallelAuthenticator::ResolveCryptohomeFailureState() { if (check_key_attempted_) return LOGIN_FAILED; + if (current_state_->cryptohome_code() == + cryptohome::MOUNT_ERROR_TPM_NEEDS_REBOOT) { + // Critical TPM error detected, reboot needed. + return FAILED_TPM; + } + // Return intermediate states in the following cases: // 1. When there is a parallel online attempt to resolve them later; // This is the case with legacy ClientLogin flow; diff --git a/chrome/browser/chromeos/login/parallel_authenticator.h b/chrome/browser/chromeos/login/parallel_authenticator.h index a67a7e6..7b82e54 100644 --- a/chrome/browser/chromeos/login/parallel_authenticator.h +++ b/chrome/browser/chromeos/login/parallel_authenticator.h @@ -50,6 +50,7 @@ class ParallelAuthenticator : public Authenticator, FAILED_MOUNT, // Failed to mount existing cryptohome. FAILED_REMOVE, // Failed to remove existing cryptohome. FAILED_TMPFS, // Failed to mount tmpfs for guest user + FAILED_TPM, // Failed to mount/create cryptohome because of TPM error. CREATE_NEW, // Need to create cryptohome for a new user. RECOVER_MOUNT, // After RecoverEncryptedData, mount cryptohome. POSSIBLE_PW_CHANGE, // Offline login failed, user may have changed pw. diff --git a/chrome/browser/chromeos/login/webui_login_display.cc b/chrome/browser/chromeos/login/webui_login_display.cc index 2bbdb55..1a457467 100644 --- a/chrome/browser/chromeos/login/webui_login_display.cc +++ b/chrome/browser/chromeos/login/webui_login_display.cc @@ -168,6 +168,13 @@ void WebUILoginDisplay::ShowError(int error_msg_id, accessibility::MaybeSpeak(error_text); } +void WebUILoginDisplay::ShowErrorScreen(LoginDisplay::SigninError error_id) { + VLOG(1) << "Show error screen, error_id: " << error_id; + if (!webui_handler_) + return; + webui_handler_->ShowErrorScreen(error_id); +} + void WebUILoginDisplay::ShowGaiaPasswordChanged(const std::string& username) { if (webui_handler_) webui_handler_->ShowGaiaPasswordChanged(username); diff --git a/chrome/browser/chromeos/login/webui_login_display.h b/chrome/browser/chromeos/login/webui_login_display.h index 5728d75..a11f73c 100644 --- a/chrome/browser/chromeos/login/webui_login_display.h +++ b/chrome/browser/chromeos/login/webui_login_display.h @@ -38,6 +38,7 @@ class WebUILoginDisplay : public LoginDisplay, virtual void ShowError(int error_msg_id, int login_attempts, HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; + virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; // SigninScreenHandlerDelegate implementation: diff --git a/chrome/browser/resources/chromeos/login/display_manager.js b/chrome/browser/resources/chromeos/login/display_manager.js index c1445f2..cb9b3d2 100644 --- a/chrome/browser/resources/chromeos/login/display_manager.js +++ b/chrome/browser/resources/chromeos/login/display_manager.js @@ -14,6 +14,7 @@ /** @const */ var SCREEN_GAIA_SIGNIN = 'gaia-signin'; /** @const */ var SCREEN_ACCOUNT_PICKER = 'account-picker'; /** @const */ var SCREEN_USER_IMAGE_PICKER = 'user-image'; +/** @const */ var SCREEN_TPM_ERROR = 'tpm-error-message'; /* Accelerator identifiers. Must be kept in sync with webui_login_view.cc. */ /** @const */ var ACCELERATOR_CANCEL = 'cancel'; @@ -548,6 +549,13 @@ cr.define('cr.ui.login', function() { }; /** + * Shows TPM error screen. + */ + DisplayManager.showTpmError = function() { + login.TPMErrorMessageScreen.show(); + }; + + /** * Clears error bubble. */ DisplayManager.clearErrors = function() { diff --git a/chrome/browser/resources/chromeos/login/login.html b/chrome/browser/resources/chromeos/login/login.html index d1ad4ca..46735fa 100644 --- a/chrome/browser/resources/chromeos/login/login.html +++ b/chrome/browser/resources/chromeos/login/login.html @@ -14,6 +14,7 @@ <link rel="stylesheet" href="screen_account_picker.css"> <link rel="stylesheet" href="screen_gaia_signin.css"> <link rel="stylesheet" href="screen_error_message.css"> +<link rel="stylesheet" href="screen_tpm_error.css"> <link rel="stylesheet" href="user_pod_row.css"> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/event_tracker.js"></script> @@ -42,6 +43,7 @@ <script src="screen_account_picker.js"></script> <script src="screen_gaia_signin.js"></script> <script src="screen_error_message.js"></script> +<script src="screen_tpm_error.js"></script> <script src="user_pod_row.js"></script> </head> <body class="login-display" i18n-values=".style.fontFamily:fontfamily;"> @@ -64,6 +66,7 @@ <include src="screen_gaia_signin.html"> <include src="screen_account_picker.html"> <include src="screen_error_message.html"> + <include src="screen_tpm_error.html"> <include src="oobe_screen_reset.html"> </div> <hr class="bottom shadow"> diff --git a/chrome/browser/resources/chromeos/login/login.js b/chrome/browser/resources/chromeos/login/login.js index 094c057..dfa9a8e 100644 --- a/chrome/browser/resources/chromeos/login/login.js +++ b/chrome/browser/resources/chromeos/login/login.js @@ -38,6 +38,7 @@ cr.define('cr.ui', function() { oobe.UserImageScreen.register(/* lazyInit= */ true); oobe.ResetScreen.register(); login.ErrorMessageScreen.register(); + login.TPMErrorMessageScreen.register(); cr.ui.Bubble.decorate($('bubble')); login.HeaderBar.decorate($('login-header-bar')); @@ -136,6 +137,13 @@ cr.define('cr.ui', function() { }; /** + * Shows TPM error screen. + */ + Oobe.showTpmError = function() { + DisplayManager.showTpmError(); + }; + + /** * Clears error bubble. */ Oobe.clearErrors = function() { diff --git a/chrome/browser/resources/chromeos/login/oobe.css b/chrome/browser/resources/chromeos/login/oobe.css index f64c05c..253f096 100644 --- a/chrome/browser/resources/chromeos/login/oobe.css +++ b/chrome/browser/resources/chromeos/login/oobe.css @@ -119,7 +119,8 @@ html[oobe=new] #oobe.gaia-signin #inner-container, html[oobe=new] #oobe.oauth-enrollment #inner-container, html[oobe=new] #oobe.reset #inner-container, html[oobe=new] #oobe.update #inner-container, -html[oobe=new] #oobe.user-image #inner-container { +html[oobe=new] #oobe.user-image #inner-container, +html[oobe=new] #oobe.tpm-error-message #inner-container { background: -webkit-linear-gradient(rgba(255,255,255,0.99), rgba(255,255,255,0.95)); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), diff --git a/chrome/browser/resources/chromeos/login/oobe.html b/chrome/browser/resources/chromeos/login/oobe.html index 73ec9db..b685db3 100644 --- a/chrome/browser/resources/chromeos/login/oobe.html +++ b/chrome/browser/resources/chromeos/login/oobe.html @@ -14,6 +14,7 @@ <link rel="stylesheet" href="screen_account_picker.css"> <link rel="stylesheet" href="screen_gaia_signin.css"> <link rel="stylesheet" href="screen_error_message.css"> +<link rel="stylesheet" href="screen_tpm_error.css"> <link rel="stylesheet" href="user_pod_row.css"> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/event_tracker.js"></script> @@ -45,6 +46,7 @@ <script src="screen_account_picker.js"></script> <script src="screen_gaia_signin.js"></script> <script src="screen_error_message.js"></script> +<script src="screen_tpm_error.js"></script> <script src="user_pod_row.js"></script> </head> <body i18n-values=".style.fontFamily:fontfamily;"> @@ -70,6 +72,7 @@ <include src="screen_gaia_signin.html"> <include src="screen_account_picker.html"> <include src="screen_error_message.html"> + <include src="screen_tpm_error.html"> <include src="oobe_screen_reset.html"> </div> <hr class="bottom shadow"> diff --git a/chrome/browser/resources/chromeos/login/oobe.js b/chrome/browser/resources/chromeos/login/oobe.js index 93dba47..7d593dd 100644 --- a/chrome/browser/resources/chromeos/login/oobe.js +++ b/chrome/browser/resources/chromeos/login/oobe.js @@ -74,6 +74,7 @@ cr.define('cr.ui', function() { login.GaiaSigninScreen.register(); oobe.UserImageScreen.register(/* lazyInit= */ false); login.ErrorMessageScreen.register(); + login.TPMErrorMessageScreen.register(); cr.ui.Bubble.decorate($('bubble')); login.HeaderBar.decorate($('login-header-bar')); @@ -320,6 +321,13 @@ cr.define('cr.ui', function() { }; /** + * Shows TPM error screen. + */ + Oobe.showTpmError = function() { + DisplayManager.showTpmError(); + }; + + /** * Clears error bubble. */ Oobe.clearErrors = function() { diff --git a/chrome/browser/resources/chromeos/login/screen_tpm_error.css b/chrome/browser/resources/chromeos/login/screen_tpm_error.css new file mode 100644 index 0000000..e3cd83b --- /dev/null +++ b/chrome/browser/resources/chromeos/login/screen_tpm_error.css @@ -0,0 +1,28 @@ +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#tpm-error-message { + height: 570px; + /* Screen has no controls but has padding at the last text message */ + padding: 70px 17px 50px; + width: 485px; +} + +#tpm-error-message-body { + color: #606060; + margin: 60px 50px; +} + +#tmp-error-text, +#tmp-error-reboot-text { + margin-top: 15px; +} + +#tpm-error-icon { + background: url(chrome://theme/IDR_CRITICAL_ERROR) no-repeat center center; + height: 130px; + margin-top: 45px; + width: 351px; /* tpm-error-message-body content width */ +} diff --git a/chrome/browser/resources/chromeos/login/screen_tpm_error.html b/chrome/browser/resources/chromeos/login/screen_tpm_error.html new file mode 100644 index 0000000..9db88cb --- /dev/null +++ b/chrome/browser/resources/chromeos/login/screen_tpm_error.html @@ -0,0 +1,10 @@ +<div id="tpm-error-message" class="step faded hidden"> + <div class="step-contents"> + <div id="tpm-error-message-body"> + <div id="tmp-error-text" i18n-content="errorTpmFailure"></div> + <div id="tmp-error-reboot-text" + i18n-content="errorTpmFailureReboot"></div> + <div id="tpm-error-icon"></div> + </div> + </div> +</div> diff --git a/chrome/browser/resources/chromeos/login/screen_tpm_error.js b/chrome/browser/resources/chromeos/login/screen_tpm_error.js new file mode 100644 index 0000000..2c378d4 --- /dev/null +++ b/chrome/browser/resources/chromeos/login/screen_tpm_error.js @@ -0,0 +1,44 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/** + * @fileoverview Offline message screen implementation. + */ + +cr.define('login', function() { + /** + * Creates a new TPM error message screen div. + * @constructor + * @extends {HTMLDivElement} + */ + var TPMErrorMessageScreen = cr.ui.define('div'); + + /** + * Registers with Oobe. + */ + TPMErrorMessageScreen.register = function() { + var screen = $('tpm-error-message'); + TPMErrorMessageScreen.decorate(screen); + Oobe.getInstance().registerScreen(screen); + }; + + TPMErrorMessageScreen.prototype = { + __proto__: HTMLDivElement.prototype, + + /** @inheritDoc */ + decorate: function() { + } + }; + + /** + * Show TPM screen. + */ + TPMErrorMessageScreen.show = function() { + Oobe.showScreen({id: SCREEN_TPM_ERROR}); + }; + + return { + TPMErrorMessageScreen: TPMErrorMessageScreen + }; +}); 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 8175a7b..7e82afd 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc @@ -46,6 +46,7 @@ #include "google_apis/gaia/gaia_auth_util.h" #include "google_apis/gaia/gaia_switches.h" #include "google_apis/gaia/gaia_urls.h" +#include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -415,6 +416,12 @@ void SigninScreenHandler::GetLocalizedStrings( l10n_util::GetStringUTF16(IDS_OFFLINE_LOGIN_HTML)); localized_strings->SetString("removeUser", l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)); + localized_strings->SetString("errorTpmFailure", + l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_TPM_FAILURE)); + localized_strings->SetString("errorTpmFailureReboot", + l10n_util::GetStringFUTF16( + IDS_LOGIN_ERROR_TPM_FAILURE_REBOOT, + l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); localized_strings->SetString("disabledAddUserTooltip", l10n_util::GetStringUTF16( g_browser_process->browser_policy_connector()->IsEnterpriseManaged() ? @@ -638,6 +645,17 @@ void SigninScreenHandler::ShowError(int login_attempts, help_id); } +void SigninScreenHandler::ShowErrorScreen(LoginDisplay::SigninError error_id) { + switch (error_id) { + case LoginDisplay::TPM_ERROR: + web_ui()->CallJavascriptFunction("cr.ui.Oobe.showTpmError"); + break; + default: + NOTREACHED() << "Unknown sign in error"; + break; + } +} + void SigninScreenHandler::ShowGaiaPasswordChanged(const std::string& username) { email_ = username; password_changed_for_.insert(email_); diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h index 3744a4a..9e5e279 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h @@ -11,6 +11,7 @@ #include "base/memory/weak_ptr.h" #include "chrome/browser/browsing_data/browsing_data_remover.h" #include "chrome/browser/chromeos/login/help_app_launcher.h" +#include "chrome/browser/chromeos/login/login_display.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/system_key_event_listener.h" #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" @@ -43,6 +44,7 @@ class LoginDisplayWebUIHandler { const std::string& error_text, const std::string& help_link_text, HelpAppLauncher::HelpTopic help_topic_id) = 0; + virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0; virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; // Show siginin screen for the given credentials. virtual void ShowSigninScreenForCreds(const std::string& username, @@ -166,6 +168,7 @@ class SigninScreenHandler : public BaseScreenHandler, const std::string& error_text, const std::string& help_link_text, HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; + virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; virtual void ShowSigninScreenForCreds(const std::string& username, const std::string& password) OVERRIDE; virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; |