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

Side by Side Diff: chrome/browser/resources/md_user_manager/create_profile.js

Issue 1920253002: Refactors parse_html_subset() into i18n_behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698