summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 14:54:39 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 14:54:39 +0000
commit1fb287960ce251b104b795cac3849f3045549a7b (patch)
tree0f3d32cfdd020d443efd87bf06815da5058c53b0 /chrome/installer/setup
parent15c51aae988ab0fe3204211143704cd47f3f897e (diff)
downloadchromium_src-1fb287960ce251b104b795cac3849f3045549a7b.zip
chromium_src-1fb287960ce251b104b795cac3849f3045549a7b.tar.gz
chromium_src-1fb287960ce251b104b795cac3849f3045549a7b.tar.bz2
Add termination of the chrome frame helper process to the uninstaller.
Also, alphabetize constants in util_constants.h|cc. BUG=53127 TEST=Uninstall user-level Chrome Frame. The chrome_frame_helper.exe process is no longer running. Review URL: http://codereview.chromium.org/3298020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r--chrome/installer/setup/uninstall.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 8839c7a..8751185 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -65,6 +65,17 @@ void CloseAllChromeProcesses() {
ResultCodes::HUNG, NULL);
}
+// Attempts to close the Chrome Frame helper process by sending WM_CLOSE
+// messages to its window, or just killing it if that doesn't work.
+void CloseAllChromeFrameHelperProcesses() {
+ HWND window = FindWindow(installer_util::kChromeFrameHelperWndClass, NULL);
+ if (window &&
+ !SendMessageTimeout(window, WM_CLOSE, 0, 0, SMTO_BLOCK, 3000, NULL)) {
+ base::CleanupProcesses(installer_util::kChromeFrameHelperExe, 0,
+ ResultCodes::HUNG, NULL);
+ }
+}
+
// This method tries to figure out if current user has registered Chrome.
// It returns true iff:
// - Software\Clients\StartMenuInternet\Chromium\"" key has a valid value.
@@ -549,6 +560,11 @@ installer_util::InstallStatus installer_setup::UninstallChrome(
}
}
+ // Close any Chrome Frame helper processes that may be running.
+ if (InstallUtil::IsChromeFrameProcess()) {
+ CloseAllChromeFrameHelperProcesses();
+ }
+
if (!installed_version.get())
return installer_util::UNINSTALL_SUCCESSFUL;