| 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..8fb4d4341a4c07a1887531e4e1732f487af2c4bc 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,9 @@ void EnterpriseOAuthEnrollmentScreenHandler::HandleClose(
|
| // In that case, keep the profile data.
|
| DoClose(false);
|
| }
|
| +
|
| + // String is only used as a human-readable error message for test automation.
|
| + NotifyObservers(false, "OAuth enrollment cancelled");
|
| }
|
|
|
| void EnterpriseOAuthEnrollmentScreenHandler::HandleCompleteLogin(
|
| @@ -467,6 +455,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) {
|
|
|