summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main_win.cc
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 20:52:18 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 20:52:18 +0000
commit53c38d23fb0d73d48f3fd804da52fd374d08e2c9 (patch)
tree675f149d7c8d4867f8594fe0ec2bdd02aa53dd51 /chrome/browser/browser_main_win.cc
parent79db623ab30e307049cd9ad0cc22a8ff1a399cbb (diff)
downloadchromium_src-53c38d23fb0d73d48f3fd804da52fd374d08e2c9.zip
chromium_src-53c38d23fb0d73d48f3fd804da52fd374d08e2c9.tar.gz
chromium_src-53c38d23fb0d73d48f3fd804da52fd374d08e2c9.tar.bz2
Small cleanup of DoUninstallTasks()
- eliminates one #ifdef - Did I mention is cleaner? Review URL: http://codereview.chromium.org/21331 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_win.cc')
-rw-r--r--chrome/browser/browser_main_win.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc
index ef34c41..a7a0f6c 100644
--- a/chrome/browser/browser_main_win.cc
+++ b/chrome/browser/browser_main_win.cc
@@ -45,7 +45,18 @@ bool AskForUninstallConfirmation() {
return (IDOK == win_util::MessageBox(NULL, text, caption, flags));
}
-int DoUninstallTasks() {
+void ShowCloseBrowserFirstMessageBox() {
+ const std::wstring text = l10n_util::GetString(IDS_UNINSTALL_CLOSE_APP);
+ const std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME);
+ const UINT flags = MB_OK | MB_ICONWARNING | MB_TOPMOST;
+ win_util::MessageBox(NULL, text, caption, flags);
+}
+
+int DoUninstallTasks(bool chrome_still_running) {
+ if (chrome_still_running) {
+ ShowCloseBrowserFirstMessageBox();
+ return ResultCodes::UNINSTALL_CHROME_ALIVE;
+ }
if (!AskForUninstallConfirmation())
return ResultCodes::UNINSTALL_USER_CANCEL;
// The following actions are just best effort.