Chromium Code Reviews| Index: chrome/browser/resources/options/browser_options.js |
| diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js |
| index 2dbfc5d0d5b7bee16236aa53c61d34a34429146d..fbb557d727dd319ac823f70f6447ad4cff5a3ba6 100644 |
| --- a/chrome/browser/resources/options/browser_options.js |
| +++ b/chrome/browser/resources/options/browser_options.js |
| @@ -324,6 +324,7 @@ cr.define('options', function() { |
| var profilesList = $('profiles-list'); |
| options.browser_options.ProfileList.decorate(profilesList); |
| profilesList.autoExpands = true; |
| + profilesList.canDeleteItems = true; |
|
tapted
2015/01/26 23:36:07
I'm not a webui guru, but this is probably unneces
noms (inactive)
2015/01/28 02:20:13
Done.
|
| // The profiles info data in |loadTimeData| might be stale. |
| this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); |
| @@ -353,6 +354,10 @@ cr.define('options', function() { |
| $('profiles-delete').disabled = true; |
| $('profiles-list').canDeleteItems = false; |
| } |
| + if (!loadTimeData.getBoolean('allowProfileDeletion')) { |
| + $('profiles-delete').disabled = true; |
| + $('profiles-list').canDeleteItems = false; |
| + } |
| } |
| if (cr.isChromeOS) { |
| @@ -1406,14 +1411,13 @@ cr.define('options', function() { |
| var selectedProfile = profilesList.selectedItem; |
| var hasSelection = selectedProfile != null; |
| var hasSingleProfile = profilesList.dataModel.length == 1; |
| - var isSupervised = loadTimeData.getBoolean('profileIsSupervised'); |
| $('profiles-manage').disabled = !hasSelection || |
| !selectedProfile.isCurrentProfile; |
| if (hasSelection && !selectedProfile.isCurrentProfile) |
| $('profiles-manage').title = loadTimeData.getString('currentUserOnly'); |
| else |
| $('profiles-manage').title = ''; |
| - $('profiles-delete').disabled = isSupervised || |
| + $('profiles-delete').disabled = !profilesList.canDeleteItems_ || |
|
tapted
2015/01/26 23:36:07
Does this need an accessor (i.e. trailing undersco
noms (inactive)
2015/01/28 02:20:13
Done.
|
| (!hasSelection && !hasSingleProfile); |
| if (OptionsPage.isSettingsApp()) { |
| $('profiles-app-list-switch').disabled = !hasSelection || |