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

Side by Side 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: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 'create-profile' is a page that contains controls for creating 6 * @fileoverview 'create-profile' is a page that contains controls for creating
7 * a (optionally supervised) profile, including choosing a name, and an avatar. 7 * a (optionally supervised) profile, including choosing a name, and an avatar.
8 */ 8 */
9 (function() { 9 (function() {
10 /** 10 /**
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 this.browserProxy_.getAvailableIcons(); 126 this.browserProxy_.getAvailableIcons();
127 this.browserProxy_.getSignedInUsers(); 127 this.browserProxy_.getSignedInUsers();
128 128
129 // Alias on 'this' to use in html. 129 // Alias on 'this' to use in html.
130 this.NO_USER_SELECTED = NO_USER_SELECTED; 130 this.NO_USER_SELECTED = NO_USER_SELECTED;
131 }, 131 },
132 132
133 /** 133 /**
134 * Handles tap events from dynamically created links in warning/error messages 134 * Handles tap events from dynamically created links in warning/error messages
135 * pushed by the browser. 135 * pushed by the browser as well as the noSignedInUserMessage i18n string.
tommycli 2016/05/02 19:10:13 Would this comment be more readable as? Handles t
Moe 2016/05/02 20:34:56 Done.
136 * @param {!Event} event 136 * @param {!Event} event
137 * @private 137 * @private
138 */ 138 */
139 onTap_: function(event) { 139 onTap_: function(event) {
140 var element = Polymer.dom(event).rootTarget; 140 var element = Polymer.dom(event).rootTarget;
141 141
142 if (element.id == 'supervised-user-import-existing') { 142 if (element.id == 'supervised-user-import-existing') {
143 this.onImportUserTap_(event); 143 this.onImportUserTap_(event);
144 event.preventDefault(); 144 event.preventDefault();
145 } else if (element.id == 'sign-in-to-chrome') {
146 this.browserProxy_.openUrlInLastActiveProfileBrowser(element.href);
147 event.preventDefault();
tommycli 2016/05/02 19:10:13 You could move this line outside the if blocks
Moe 2016/05/02 20:34:57 This handler handles all tap events on the page. W
tommycli 2016/05/02 21:57:49 You are correct. My mistake :)
145 } 148 }
146 // TODO(mahmadi): handle tap event on '#reauth' to re-auth the custodian. 149 // TODO(mahmadi): handle tap event on '#reauth' to re-auth the custodian.
147 }, 150 },
148 151
149 /** 152 /**
150 * Handler for when the profile icons are pushed from the browser. 153 * Handler for when the profile icons are pushed from the browser.
151 * @param {!Array<string>} iconUrls 154 * @param {!Array<string>} iconUrls
152 * @private 155 * @private
153 */ 156 */
154 handleProfileIcons_: function(iconUrls) { 157 handleProfileIcons_: function(iconUrls) {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 * Computed binding that returns True if there are any signed-in users. 415 * Computed binding that returns True if there are any signed-in users.
413 * @param {!Array<!SignedInUser>} signedInUsers signed-in users. 416 * @param {!Array<!SignedInUser>} signedInUsers signed-in users.
414 * @return {boolean} 417 * @return {boolean}
415 * @private 418 * @private
416 */ 419 */
417 isSignedIn_: function(signedInUsers) { 420 isSignedIn_: function(signedInUsers) {
418 return signedInUsers.length > 0; 421 return signedInUsers.length > 0;
419 } 422 }
420 }); 423 });
421 }()); 424 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698