Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9128)

Unified Diff: chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc

Issue 10408072: Rewrite of the EnrollEnterpriseDevice PyAuto automation hook for WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..3e923086087e8d94b940638db74e7017899d6270 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,13 +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(
@@ -399,6 +392,8 @@ void EnterpriseOAuthEnrollmentScreenHandler::HandleClose(
// In that case, keep the profile data.
DoClose(false);
}
+
+ NotifyObservers(false, "Oauth enrollment cancelled");
}
void EnterpriseOAuthEnrollmentScreenHandler::HandleCompleteLogin(
@@ -467,6 +462,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) {

Powered by Google App Engine
This is Rietveld 408576698