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

Unified Diff: chrome/browser/resources/md_user_manager/create_profile.js

Issue 1939933002: MD User Manager: Supervised user checkbox is always displaying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md-user-manager-stylesheets
Patch Set: rebase Created 4 years, 8 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/md_user_manager/create_profile.js
diff --git a/chrome/browser/resources/md_user_manager/create_profile.js b/chrome/browser/resources/md_user_manager/create_profile.js
index 63cfa78c672462a98f915630b6d70932dd14f853..8f12f20550132ecc66275d85cc7c36e873afcade 100644
--- a/chrome/browser/resources/md_user_manager/create_profile.js
+++ b/chrome/browser/resources/md_user_manager/create_profile.js
@@ -8,7 +8,7 @@
*/
(function() {
/**
- * It means the sentinel menu item is selected.
+ * Sentinel signed-in user's index value.
* @const {number}
*/
var NO_USER_SELECTED = -1;
@@ -94,6 +94,16 @@ Polymer({
value: NO_USER_SELECTED
},
+ /**
+ * Sentinel signed-in user's index value.
+ * @private {number}
+ */
+ sentinelSignedInUserIndex_: {
+ type: Number,
+ value: NO_USER_SELECTED,
+ readOnly: true
+ },
+
/** @private {!signin.ProfileBrowserProxy} */
browserProxy_: Object
},
@@ -125,14 +135,12 @@ Polymer({
this.browserProxy_.getAvailableIcons();
this.browserProxy_.getSignedInUsers();
-
- // Alias on 'this' to use in html.
- this.NO_USER_SELECTED = NO_USER_SELECTED;
},
/**
- * Handles tap events from dynamically created links in warning/error messages
- * pushed by the browser.
+ * Handles tap events from:
+ * - links within dynamic warning/error messages pushed from the browser.
+ * - the 'noSignedInUserMessage' i18n string.
* @param {!Event} event
* @private
*/
@@ -142,6 +150,9 @@ Polymer({
if (element.id == 'supervised-user-import-existing') {
this.onImportUserTap_(event);
event.preventDefault();
+ } else if (element.id == 'sign-in-to-chrome') {
+ this.browserProxy_.openUrlInLastActiveProfileBrowser(element.href);
+ event.preventDefault();
}
// TODO(mahmadi): handle tap event on '#reauth' to re-auth the custodian.
},

Powered by Google App Engine
This is Rietveld 408576698