Index: chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js |
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js |
index 4e17210ed5e2124e5cac9b380a7dc1f2c8c8256d..3d302020d3e746f812f114f6f4d70f0d6e131c19 100644 |
--- a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js |
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js |
@@ -15,6 +15,7 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { |
/** @const */ var STEP_ATTRIBUTE_PROMPT = 'attribute-prompt'; |
/** @const */ var STEP_ERROR = 'error'; |
/** @const */ var STEP_SUCCESS = 'success'; |
+ /** @const */ var STEP_ABE_SUCCESS = 'abe-success'; |
/* TODO(dzhioev): define this step on C++ side. |
/** @const */ var STEP_ATTRIBUTE_PROMPT_ERROR = 'attribute-prompt-error'; |
@@ -27,6 +28,7 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { |
'showError', |
'doReload', |
'showAttributePromptStep', |
+ 'showAttestationBasedEnrollmentSuccess', |
], |
/** |
@@ -157,6 +159,8 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { |
'buttonclick', doneCallback); |
$('oauth-enroll-success-card').addEventListener( |
'buttonclick', doneCallback); |
+ $('oauth-enroll-abe-success-card').addEventListener( |
+ 'buttonclick', doneCallback); |
this.navigation_.addEventListener('close', this.cancel.bind(this)); |
this.navigation_.addEventListener('refresh', this.cancel.bind(this)); |
@@ -249,6 +253,16 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { |
}, |
/** |
+ * Shows a success card for attestation-based enrollment that shows |
+ * which domain the device was enrolled into. |
+ */ |
+ showAttestationBasedEnrollmentSuccess: function(enterprise_domain) { |
xiyuan
2016/09/08 19:37:54
nit: enterprise_domain -> enterpriseDomain
The id
|
+ $('oauth-enroll-abe-success-card').innerHTML = |
+ loadTimeData.getStringF('oauthEnrollAbeSuccess', enterprise_domain); |
+ this.showStep(STEP_ABE_SUCCESS); |
+ }, |
+ |
+ /** |
* Cancels the current authentication and drops the user back to the next |
* screen (either the next authentication or the login screen). |
*/ |
@@ -274,6 +288,8 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { |
$('oauth-enroll-error-card').submitButton.focus(); |
} else if (step == STEP_SUCCESS) { |
$('oauth-enroll-success-card').submitButton.focus(); |
+ } else if (step == STEP_ABE_SUCCESS) { |
+ $('oauth-enroll-abe-success-card').submitButton.focus(); |
} else if (step == STEP_ATTRIBUTE_PROMPT) { |
$('oauth-enroll-asset-id').focus(); |
} else if (step == STEP_ATTRIBUTE_PROMPT_ERROR) { |