| OLD | NEW |
| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 if (supervisedUsers[j].name == this.profileName_) { | 267 if (supervisedUsers[j].name == this.profileName_) { |
| 268 nameIsUnique = false; | 268 nameIsUnique = false; |
| 269 allOnCurrentDevice = allOnCurrentDevice && | 269 allOnCurrentDevice = allOnCurrentDevice && |
| 270 supervisedUsers[j].onCurrentDevice; | 270 supervisedUsers[j].onCurrentDevice; |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 | 273 |
| 274 this.handleMessage_(allOnCurrentDevice ? | 274 this.handleMessage_(allOnCurrentDevice ? |
| 275 this.i18n('managedProfilesExistingLocalSupervisedUser') : | 275 this.i18n('managedProfilesExistingLocalSupervisedUser') : |
| 276 this.i18n('manageProfilesExistingSupervisedUser', | 276 this.i18n('manageProfilesExistingSupervisedUser', |
| 277 HTMLEscape(elide(this.profileName_, /* maxLength */ 50)))); | 277 [HTMLEscape(elide(this.profileName_, /* maxLength */ 50))])); |
| 278 return; | 278 return; |
| 279 } | 279 } |
| 280 // No existing supervised user's name matches the entered profile name. | 280 // No existing supervised user's name matches the entered profile name. |
| 281 // Continue with creating the new supervised profile. | 281 // Continue with creating the new supervised profile. |
| 282 this.createProfile_(); | 282 this.createProfile_(); |
| 283 }, | 283 }, |
| 284 | 284 |
| 285 /** | 285 /** |
| 286 * Creates the new profile. | 286 * Creates the new profile. |
| 287 * @private | 287 * @private |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 * Computed binding that returns True if there are any signed-in users. | 412 * Computed binding that returns True if there are any signed-in users. |
| 413 * @param {!Array<!SignedInUser>} signedInUsers signed-in users. | 413 * @param {!Array<!SignedInUser>} signedInUsers signed-in users. |
| 414 * @return {boolean} | 414 * @return {boolean} |
| 415 * @private | 415 * @private |
| 416 */ | 416 */ |
| 417 isSignedIn_: function(signedInUsers) { | 417 isSignedIn_: function(signedInUsers) { |
| 418 return signedInUsers.length > 0; | 418 return signedInUsers.length > 0; |
| 419 } | 419 } |
| 420 }); | 420 }); |
| 421 }()); | 421 }()); |
| OLD | NEW |