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

Side by Side Diff: chrome/browser/resources/settings/people_page/manage_profile.js

Issue 2387173002: [MD Settings][People] Disables profile name field for legacy supervised users. (Closed)
Patch Set: Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 6 * @fileoverview
7 * 'settings-manage-profile' is the settings subpage containing controls to 7 * 'settings-manage-profile' is the settings subpage containing controls to
8 * edit a profile's name, icon, and desktop shortcut. 8 * edit a profile's name, icon, and desktop shortcut.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 15 matching lines...) Expand all
26 /** 26 /**
27 * The available icons for selection. 27 * The available icons for selection.
28 * @type {!Array<string>} 28 * @type {!Array<string>}
29 */ 29 */
30 availableIcons: { 30 availableIcons: {
31 type: Array, 31 type: Array,
32 value: function() { return []; }, 32 value: function() { return []; },
33 }, 33 },
34 34
35 /** 35 /**
36 * The current sync status.
37 * @type {?settings.SyncStatus}
38 */
39 syncStatus: Object,
40
41 /**
36 * @private {!settings.ManageProfileBrowserProxy} 42 * @private {!settings.ManageProfileBrowserProxy}
37 */ 43 */
38 browserProxy_: { 44 browserProxy_: {
39 type: Object, 45 type: Object,
40 value: function() { 46 value: function() {
41 return settings.ManageProfileBrowserProxyImpl.getInstance(); 47 return settings.ManageProfileBrowserProxyImpl.getInstance();
42 }, 48 },
43 }, 49 },
44 }, 50 },
45 51
(...skipping 22 matching lines...) Expand all
68 74
69 /** 75 /**
70 * Handler for when an avatar is activated. 76 * Handler for when an avatar is activated.
71 * @param {!Event} event 77 * @param {!Event} event
72 * @private 78 * @private
73 */ 79 */
74 onIconActivate_: function(event) { 80 onIconActivate_: function(event) {
75 this.browserProxy_.setProfileIconAndName(event.detail.selected, 81 this.browserProxy_.setProfileIconAndName(event.detail.selected,
76 this.profileName); 82 this.profileName);
77 }, 83 },
84
85 /**
86 * @param {?settings.SyncStatus} syncStatus
87 * @return {boolean} Whether to disable the profile name field.
88 * @private
89 */
90 disableProfileName_: function(syncStatus) {
tommycli 2016/10/03 20:37:22 isProfileNameDisabled_
Moe 2016/10/03 22:26:43 Done.
91 return !!syncStatus.supervisedUser && !syncStatus.childUser;
92 },
78 }); 93 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698