| Index: chrome/browser/resources/options/personal_options.js
|
| diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js
|
| index 3b44018deacb49d5b97e49616dcc266422bc4968..23483d01a22fd0f27e2d2e8adac4a2c5a06e742a 100644
|
| --- a/chrome/browser/resources/options/personal_options.js
|
| +++ b/chrome/browser/resources/options/personal_options.js
|
| @@ -60,8 +60,9 @@ cr.define('options', function() {
|
| profilesList.onchange = function(event) {
|
| var selectedProfile = profilesList.selectedItem;
|
| var hasSelection = selectedProfile != null;
|
| + var hasSingleProfile = profilesList.dataModel.length == 1;
|
| $('profiles-manage').disabled = !hasSelection;
|
| - $('profiles-delete').disabled = !hasSelection;
|
| + $('profiles-delete').disabled = !hasSingleProfile && !hasSelection;
|
| };
|
| $('profiles-create').onclick = function(event) {
|
| chrome.send('createProfile');
|
| @@ -220,10 +221,13 @@ cr.define('options', function() {
|
| * @param {number} numProfiles The number of profiles to display.
|
| */
|
| setProfileViewSingle_: function(numProfiles) {
|
| - $('profiles-list').hidden = numProfiles <= 1;
|
| - $('profiles-single-message').hidden = numProfiles > 1;
|
| - $('profiles-manage').hidden = numProfiles <= 1;
|
| - $('profiles-delete').hidden = numProfiles <= 1;
|
| + var hasSingleProfile = numProfiles == 1;
|
| + $('profiles-list').hidden = hasSingleProfile;
|
| + $('profiles-single-message').hidden = !hasSingleProfile;
|
| + $('profiles-manage').hidden = hasSingleProfile;
|
| + $('profiles-delete').textContent = hasSingleProfile ?
|
| + templateData.profilesDeleteSingle :
|
| + templateData.profilesDelete;
|
| },
|
|
|
| /**
|
|
|