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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js

Issue 2323593002: Messaging for successful attestation-based enrollment. (Closed)
Patch Set: Updated mock enrollment screen class. Created 4 years, 3 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/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) {

Powered by Google App Engine
This is Rietveld 408576698