Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: chrome/browser/browser_main_win.cc

Issue 174194: Re-apply r23841 "During uninstall if Chrome is set as default" (Closed)
Patch Set: update for combobox model changes Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/views/uninstall_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main_win.cc
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc
index b4f10523f960a3a443bedb36b3ed9625533abb01..cb3551a4d11d496a14c609ffc9396f09769f0dcf 100644
--- a/chrome/browser/browser_main_win.cc
+++ b/chrome/browser/browser_main_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -15,7 +15,7 @@
#include "base/win_util.h"
#include "chrome/browser/first_run.h"
#include "chrome/browser/metrics/metrics_service.h"
-#include "chrome/browser/views/uninstall_dialog.h"
+#include "chrome/browser/views/uninstall_view.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/result_codes.h"
@@ -24,7 +24,6 @@
#include "chrome/installer/util/shell_util.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
-#include "views/controls/message_box_view.h"
#include "views/focus/accelerator_handler.h"
#include "views/window/window.h"
@@ -43,7 +42,8 @@ bool CheckForWin2000() {
int AskForUninstallConfirmation() {
int ret = ResultCodes::NORMAL_EXIT;
- UninstallDialog::ShowUninstallDialog(ret);
+ views::Window::CreateChromeWindow(NULL, gfx::Rect(),
+ new UninstallView(ret))->Show();
views::AcceleratorHandler accelerator_handler;
MessageLoopForUI::current()->Run(&accelerator_handler);
return ret;
@@ -57,11 +57,20 @@ void ShowCloseBrowserFirstMessageBox() {
}
int DoUninstallTasks(bool chrome_still_running) {
+ // We want to show a warning to user (and exit) if Chrome is already running
+ // *before* we show the uninstall confirmation dialog box. But while the
+ // uninstall confirmation dialog is up, user might start Chrome, so we
+ // check once again after user acknowledges Uninstall dialog.
if (chrome_still_running) {
ShowCloseBrowserFirstMessageBox();
return ResultCodes::UNINSTALL_CHROME_ALIVE;
}
int ret = AskForUninstallConfirmation();
+ if (Upgrade::IsBrowserAlreadyRunning()) {
+ ShowCloseBrowserFirstMessageBox();
+ return ResultCodes::UNINSTALL_CHROME_ALIVE;
+ }
+
if (ret != ResultCodes::UNINSTALL_USER_CANCEL) {
// The following actions are just best effort.
LOG(INFO) << "Executing uninstall actions";
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/views/uninstall_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698