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

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

Issue 2323593002: Messaging for successful attestation-based enrollment. (Closed)
Patch Set: Changes for JavaScript style. 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..59eccd92b719515fac2beae97be6750185034f83 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));
@@ -242,13 +246,23 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() {
* Shows attribute-prompt step with pre-filled asset ID and
* location.
*/
- showAttributePromptStep: function(annotated_asset_id, annotated_location) {
- $('oauth-enroll-asset-id').value = annotated_asset_id;
- $('oauth-enroll-location').value = annotated_location;
+ showAttributePromptStep: function(annotatedAssetId, annotatedLocation) {
+ $('oauth-enroll-asset-id').value = annotatedAssetId;
+ $('oauth-enroll-location').value = annotatedLocation;
this.showStep(STEP_ATTRIBUTE_PROMPT);
},
/**
+ * Shows a success card for attestation-based enrollment that shows
+ * which domain the device was enrolled into.
+ */
+ showAttestationBasedEnrollmentSuccess: function(enterpriseDomain) {
+ $('oauth-enroll-abe-success-card').innerHTML =
+ loadTimeData.getStringF('oauthEnrollAbeSuccess', enterpriseDomain);
+ 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