| Index: chrome/browser/resources/options/manage_profile_overlay.js
|
| diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js
|
| index bed229f546f2088e5e04b64dc0d2fe80cd340416..a29d1a863ffb35a82510b6a023b5f6e0774651cb 100644
|
| --- a/chrome/browser/resources/options/manage_profile_overlay.js
|
| +++ b/chrome/browser/resources/options/manage_profile_overlay.js
|
| @@ -258,6 +258,21 @@ cr.define('options', function() {
|
| },
|
|
|
| /**
|
| + * Callback to show a "downloads in progress" warning in delete mode,
|
| + * called by the handler as a result of the
|
| + * 'requestProfileInProgressDownloads_' message.
|
| + * @param {number} downloadCount Number of in-progress downloads.
|
| + * @private
|
| + */
|
| + receiveDownloadCount_: function(downloadCount) {
|
| + var singleDownload = downloadCount == 1;
|
| + var multipleDownloads = downloadCount > 1;
|
| + $('delete-profile-single-download-addendum').hidden = !singleDownload;
|
| + $('delete-profile-multiple-downloads-addendum').hidden =
|
| + !multipleDownloads;
|
| + },
|
| +
|
| + /**
|
| * Display the error bubble, with |errorHtml| in the bubble.
|
| * @param {string} errorHtml The html string to display as an error.
|
| * @param {string} mode A label that specifies the type of dialog box which
|
| @@ -498,8 +513,12 @@ cr.define('options', function() {
|
| $('delete-profile-text').textContent =
|
| loadTimeData.getStringF('deleteProfileMessage',
|
| elide(profileInfo.name, /* maxLength */ 50));
|
| + $('delete-profile-single-download-addendum').hidden = true;
|
| + $('delete-profile-multiple-downloads-addendum').hidden = true;
|
| $('delete-managed-profile-addendum').hidden = !profileInfo.isManaged;
|
|
|
| + chrome.send('requestProfileInProgressDownloads', [profileInfo.filePath]);
|
| +
|
| // Because this dialog isn't useful when refreshing or as part of the
|
| // history, don't create a history entry for it when showing.
|
| OptionsPage.showPageByName('manageProfile', false);
|
| @@ -535,6 +554,7 @@ cr.define('options', function() {
|
| 'receiveNewProfileDefaults',
|
| 'receiveProfileNames',
|
| 'receiveHasProfileShortcuts',
|
| + 'receiveDownloadCount',
|
| 'setProfileInfo',
|
| 'setProfileName',
|
| 'showManageDialog',
|
|
|