Chromium Code Reviews| Index: chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc |
| diff --git a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc |
| index 99bc8fc30eaee2ec493d82aa5c66a57d54bfc39d..4bd1f500fcd1c16c7329bba0c789ae5fe517e11c 100644 |
| --- a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc |
| +++ b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc |
| @@ -152,7 +152,7 @@ void EnterpriseOAuthEnrollmentScreenHandler::ShowConfirmationScreen() { |
| ShowStep(kEnrollmentStepSuccess); |
| if (!is_auto_enrollment_ || enrollment_failed_once_) |
| ResetAuth(); |
| - NotifyObservers(true); |
| + NotifyObservers(true, ""); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowAuthError( |
| @@ -186,31 +186,26 @@ void EnterpriseOAuthEnrollmentScreenHandler::ShowAuthError( |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowAccountError() { |
| UMAFailure(policy::kMetricEnrollmentNotSupported); |
| ShowError(IDS_ENTERPRISE_ENROLLMENT_ACCOUNT_ERROR, true); |
| - NotifyObservers(false); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowSerialNumberError() { |
| UMAFailure(policy::kMetricEnrollmentInvalidSerialNumber); |
| ShowError(IDS_ENTERPRISE_ENROLLMENT_SERIAL_NUMBER_ERROR, true); |
| - NotifyObservers(false); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowEnrollmentModeError() { |
| UMAFailure(policy::kMetricEnrollmentInvalidEnrollmentMode); |
| ShowError(IDS_ENTERPRISE_ENROLLMENT_MODE_ERROR, false); |
| - NotifyObservers(false); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowFatalAuthError() { |
| UMAFailure(policy::kMetricEnrollmentLoginFailed); |
| ShowError(IDS_ENTERPRISE_ENROLLMENT_FATAL_AUTH_ERROR, false); |
| - NotifyObservers(false); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowFatalEnrollmentError() { |
| UMAFailure(policy::kMetricEnrollmentOtherFailed); |
| ShowError(IDS_ENTERPRISE_ENROLLMENT_FATAL_ENROLLMENT_ERROR, false); |
| - NotifyObservers(false); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowAutoEnrollmentError() { |
| @@ -226,21 +221,11 @@ void EnterpriseOAuthEnrollmentScreenHandler::ShowAutoEnrollmentError() { |
| "oobe.OAuthEnrollmentScreen.setIsAutoEnrollment", value); |
| ShowError(IDS_ENTERPRISE_AUTO_ENROLLMENT_ERROR, false); |
| - NotifyObservers(false); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowNetworkEnrollmentError() { |
| UMAFailure(policy::kMetricEnrollmentNetworkFailed); |
| ShowError(IDS_ENTERPRISE_ENROLLMENT_NETWORK_ENROLLMENT_ERROR, true); |
| - NotifyObservers(false); |
| -} |
| - |
| -void EnterpriseOAuthEnrollmentScreenHandler::SubmitTestCredentials( |
| - const std::string& email, |
| - const std::string& password) { |
| - test_email_ = email; |
| - test_password_ = password; |
| - DoShow(); |
| } |
| // EnterpriseOAuthEnrollmentScreenHandler BaseScreenHandler implementation ----- |
| @@ -399,6 +384,8 @@ void EnterpriseOAuthEnrollmentScreenHandler::HandleClose( |
| // In that case, keep the profile data. |
| DoClose(false); |
| } |
| + |
| + NotifyObservers(false, "Oauth enrollment cancelled"); |
|
Mattias Nissler (ping if slow)
2012/05/25 13:17:22
Should be "OAuth" (capital A). Also, I feel a bit
craigdh
2012/05/25 23:24:47
Done. Including a string literal is certainly not
|
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::HandleCompleteLogin( |
| @@ -467,6 +454,7 @@ void EnterpriseOAuthEnrollmentScreenHandler::ShowError(int message_id, |
| web_ui()->CallJavascriptFunction("oobe.OAuthEnrollmentScreen.showError", |
| message_value, |
| retry_value); |
| + NotifyObservers(false, message); |
| } |
| void EnterpriseOAuthEnrollmentScreenHandler::ShowWorking(int message_id) { |