Change the "close Chrome with downloads in progress" dialog to resemble kenmoore's mock
from issue 122037. Also use different text when exiting incognito mode (issue 88421).
BUG=122037,88421
TEST=manual
Review URL: http://codereview.chromium.org/9969193
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133977 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 3097714..5612008 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -627,7 +627,7 @@
// Helper function for populating and displaying the in progress downloads at
// exit alert panel.
- (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount {
- NSString* warningText = nil;
+ NSString* titleText = nil;
NSString* explanationText = nil;
NSString* waitTitle = nil;
NSString* exitTitle = nil;
@@ -635,37 +635,28 @@
// Set the dialog text based on whether or not there are multiple downloads.
if (downloadCount == 1) {
// Dialog text: warning and explanation.
- warningText = l10n_util::GetNSString(
- IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_WARNING);
+ titleText = l10n_util::GetNSString(
+ IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_TITLE);
explanationText = l10n_util::GetNSString(
IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_EXPLANATION);
-
- // Cancel download and exit button text.
- exitTitle = l10n_util::GetNSString(
- IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_OK_BUTTON_LABEL);
-
- // Wait for download button text.
- waitTitle = l10n_util::GetNSString(
- IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
} else {
// Dialog text: warning and explanation.
- warningText = l10n_util::GetNSStringF(
- IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_WARNING,
+ titleText = l10n_util::GetNSStringF(
+ IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_TITLE,
base::IntToString16(downloadCount));
explanationText = l10n_util::GetNSString(
IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_EXPLANATION);
-
- // Cancel downloads and exit button text.
- exitTitle = l10n_util::GetNSString(
- IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_OK_BUTTON_LABEL);
-
- // Wait for downloads button text.
- waitTitle = l10n_util::GetNSString(
- IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
}
+ // Cancel download and exit button text.
+ exitTitle = l10n_util::GetNSString(
+ IDS_DOWNLOAD_REMOVE_CONFIRM_OK_BUTTON_LABEL);
+
+ // Wait for download button text.
+ waitTitle = l10n_util::GetNSString(
+ IDS_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
// 'waitButton' is the default choice.
- int choice = NSRunAlertPanel(warningText, explanationText,
+ int choice = NSRunAlertPanel(titleText, explanationText,
waitTitle, exitTitle, nil);
return choice == NSAlertDefaultReturn ? YES : NO;
}