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

Unified Diff: chrome/installer/setup/uninstall.cc

Issue 11417036: Fix user-level Chrome self-destruction issues on Windows 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Kill delegate_execute only on Win8 and only remove dialog on Win8/Metro Created 8 years, 1 month 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
Index: chrome/installer/setup/uninstall.cc
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 5e50d6745c5d3eea8eb94495ea52be42eb9859b1..6fe358512c6d40e52e950a3f816af8588acb6053 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -185,39 +185,16 @@ void ClearRlzProductState() {
namespace installer {
-// This functions checks for any Chrome instances that are
-// running and first asks them to close politely by sending a Windows message.
-// If there is an error while sending message or if there are still Chrome
-// procesess active after the message has been sent, this function will try
-// to kill them.
+// Kills all Chrome processes, immediately.
void CloseAllChromeProcesses() {
- for (int j = 0; j < 4; ++j) {
- string16 wnd_class(L"Chrome_WidgetWin_");
- wnd_class.append(base::IntToString16(j));
- HWND window = FindWindowEx(NULL, NULL, wnd_class.c_str(), NULL);
- while (window) {
- HWND tmpWnd = window;
- window = FindWindowEx(NULL, window, wnd_class.c_str(), NULL);
- if (!SendMessageTimeout(tmpWnd, WM_CLOSE, 0, 0, SMTO_BLOCK, 3000, NULL) &&
- (GetLastError() == ERROR_TIMEOUT)) {
- base::CleanupProcesses(installer::kChromeExe, base::TimeDelta(),
- content::RESULT_CODE_HUNG, NULL);
- base::CleanupProcesses(installer::kNaClExe, base::TimeDelta(),
- content::RESULT_CODE_HUNG, NULL);
- return;
- }
- }
- }
-
- // If asking politely didn't work, wait for 15 seconds and then kill all
- // chrome.exe. This check is just in case Chrome is ignoring WM_CLOSE
- // messages.
- base::CleanupProcesses(installer::kChromeExe,
- base::TimeDelta::FromSeconds(15),
+ base::CleanupProcesses(installer::kChromeExe, base::TimeDelta(),
content::RESULT_CODE_HUNG, NULL);
- base::CleanupProcesses(installer::kNaClExe,
- base::TimeDelta::FromSeconds(15),
+ base::CleanupProcesses(installer::kNaClExe, base::TimeDelta(),
content::RESULT_CODE_HUNG, NULL);
+ if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
+ base::CleanupProcesses(installer::kDelegateExecuteExe, base::TimeDelta(),
+ content::RESULT_CODE_HUNG, NULL);
+ }
}
// Attempts to close the Chrome Frame helper process by sending WM_CLOSE
« chrome/browser/chrome_browser_main_win.cc ('K') | « chrome/browser/chrome_browser_main_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698