| 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 3b893b2fcc67b932cb90b023bed0dc4633f9b9a7..6fc261635b5702fc6f6f8aaa455f02e76f745061 100644
|
| --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| @@ -257,11 +257,11 @@ void LoginScreenContext::Init() {
|
|
|
| SigninScreenHandler::SigninScreenHandler(
|
| const scoped_refptr<NetworkStateInformer>& network_state_informer,
|
| - NetworkErrorModel* network_error_model,
|
| + ErrorScreen* error_screen,
|
| CoreOobeActor* core_oobe_actor,
|
| GaiaScreenHandler* gaia_screen_handler)
|
| : network_state_informer_(network_state_informer),
|
| - network_error_model_(network_error_model),
|
| + error_screen_(error_screen),
|
| core_oobe_actor_(core_oobe_actor),
|
| caps_lock_enabled_(chromeos::input_method::InputMethodManager::Get()
|
| ->GetImeKeyboard()
|
| @@ -272,7 +272,7 @@ SigninScreenHandler::SigninScreenHandler(
|
| histogram_helper_(new ErrorScreensHistogramHelper("Signin")),
|
| weak_factory_(this) {
|
| DCHECK(network_state_informer_.get());
|
| - DCHECK(network_error_model_);
|
| + DCHECK(error_screen_);
|
| DCHECK(core_oobe_actor_);
|
| gaia_screen_handler_->set_signin_screen_handler(this);
|
| network_state_informer_->AddObserver(this);
|
| @@ -767,7 +767,7 @@ void SigninScreenHandler::UpdateStateInternal(NetworkError::ErrorReason reason,
|
| &SigninScreenHandler::ReloadGaia, weak_factory_.GetWeakPtr(), true));
|
|
|
| if (is_online || !is_behind_captive_portal)
|
| - network_error_model_->HideCaptivePortal();
|
| + error_screen_->HideCaptivePortal();
|
|
|
| // Hide offline message (if needed) and return if current screen is
|
| // not a Gaia frame.
|
| @@ -840,44 +840,44 @@ void SigninScreenHandler::SetupAndShowOfflineMessage(
|
| (reason == NetworkError::ERROR_REASON_LOADING_TIMEOUT);
|
|
|
| if (is_proxy_error) {
|
| - network_error_model_->SetErrorState(NetworkError::ERROR_STATE_PROXY,
|
| - std::string());
|
| + error_screen_->SetErrorState(NetworkError::ERROR_STATE_PROXY,
|
| + std::string());
|
| } else if (is_behind_captive_portal) {
|
| // Do not bother a user with obsessive captive portal showing. This
|
| // check makes captive portal being shown only once: either when error
|
| // screen is shown for the first time or when switching from another
|
| // error screen (offline, proxy).
|
| - if (IsGaiaVisible() || (network_error_model_->GetErrorState() !=
|
| - NetworkError::ERROR_STATE_PORTAL)) {
|
| - network_error_model_->FixCaptivePortal();
|
| + if (IsGaiaVisible() ||
|
| + (error_screen_->GetErrorState() != NetworkError::ERROR_STATE_PORTAL)) {
|
| + error_screen_->FixCaptivePortal();
|
| }
|
| const std::string network_name = GetNetworkName(network_path);
|
| - network_error_model_->SetErrorState(NetworkError::ERROR_STATE_PORTAL,
|
| - network_name);
|
| + error_screen_->SetErrorState(NetworkError::ERROR_STATE_PORTAL,
|
| + network_name);
|
| } else if (is_gaia_loading_timeout) {
|
| - network_error_model_->SetErrorState(
|
| - NetworkError::ERROR_STATE_AUTH_EXT_TIMEOUT, std::string());
|
| + error_screen_->SetErrorState(NetworkError::ERROR_STATE_AUTH_EXT_TIMEOUT,
|
| + std::string());
|
| } else {
|
| - network_error_model_->SetErrorState(NetworkError::ERROR_STATE_OFFLINE,
|
| - std::string());
|
| + error_screen_->SetErrorState(NetworkError::ERROR_STATE_OFFLINE,
|
| + std::string());
|
| }
|
|
|
| const bool guest_signin_allowed =
|
| IsGuestSigninAllowed() &&
|
| - IsSigninScreenError(network_error_model_->GetErrorState());
|
| - network_error_model_->AllowGuestSignin(guest_signin_allowed);
|
| + IsSigninScreenError(error_screen_->GetErrorState());
|
| + error_screen_->AllowGuestSignin(guest_signin_allowed);
|
|
|
| const bool offline_login_allowed =
|
| - IsSigninScreenError(network_error_model_->GetErrorState()) &&
|
| - network_error_model_->GetErrorState() !=
|
| + IsSigninScreenError(error_screen_->GetErrorState()) &&
|
| + error_screen_->GetErrorState() !=
|
| NetworkError::ERROR_STATE_AUTH_EXT_TIMEOUT;
|
| - network_error_model_->AllowOfflineLogin(offline_login_allowed);
|
| + error_screen_->AllowOfflineLogin(offline_login_allowed);
|
|
|
| if (GetCurrentScreen() != OobeScreen::SCREEN_ERROR_MESSAGE) {
|
| - network_error_model_->SetUIState(NetworkError::UI_STATE_SIGNIN);
|
| - network_error_model_->SetParentScreen(OobeScreen::SCREEN_GAIA_SIGNIN);
|
| - network_error_model_->Show();
|
| - histogram_helper_->OnErrorShow(network_error_model_->GetErrorState());
|
| + error_screen_->SetUIState(NetworkError::UI_STATE_SIGNIN);
|
| + error_screen_->SetParentScreen(OobeScreen::SCREEN_GAIA_SIGNIN);
|
| + error_screen_->Show();
|
| + histogram_helper_->OnErrorShow(error_screen_->GetErrorState());
|
| }
|
| }
|
|
|
| @@ -888,7 +888,7 @@ void SigninScreenHandler::HideOfflineMessage(NetworkStateInformer::State state,
|
|
|
| gaia_reload_reason_ = NetworkError::ERROR_REASON_NONE;
|
|
|
| - network_error_model_->Hide();
|
| + error_screen_->Hide();
|
| histogram_helper_->OnErrorHide();
|
|
|
| // Forces a reload for Gaia screen on hiding error message.
|
| @@ -1521,7 +1521,7 @@ bool SigninScreenHandler::IsGaiaHiddenByError() const {
|
|
|
| bool SigninScreenHandler::IsSigninScreenHiddenByError() const {
|
| return (GetCurrentScreen() == OobeScreen::SCREEN_ERROR_MESSAGE) &&
|
| - (IsSigninScreen(network_error_model_->GetParentScreen()));
|
| + (IsSigninScreen(error_screen_->GetParentScreen()));
|
| }
|
|
|
| bool SigninScreenHandler::IsGuestSigninAllowed() const {
|
|
|