summaryrefslogtreecommitdiffstats
path: root/chrome/installer
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
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')
-rw-r--r--chrome/installer/setup/uninstall.cc16
-rw-r--r--chrome/installer/util/util_constants.cc17
-rw-r--r--chrome/installer/util/util_constants.h21
3 files changed, 36 insertions, 18 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;
diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc
index fe664c0..412dd50 100644
--- a/chrome/installer/util/util_constants.cc
+++ b/chrome/installer/util/util_constants.cc
@@ -120,21 +120,22 @@ const wchar_t kToastResultsKey[] = L"toast-results-key";
} // namespace switches
+const wchar_t kChromeDll[] = L"chrome.dll";
+const wchar_t kChromeExe[] = L"chrome.exe";
+const wchar_t kChromeFrameDll[] = L"npchrome_frame.dll";
+const wchar_t kChromeFrameHelperExe[] = L"chrome_frame_helper.exe";
+const wchar_t kChromeFrameHelperWndClass[] = L"ChromeFrameHelperWindowClass";
+const wchar_t kChromeNaCl64Dll[] = L"nacl64.dll";
+const wchar_t kChromeNewExe[] = L"new_chrome.exe";
+const wchar_t kChromeOldExe[] = L"old_chrome.exe";
const wchar_t kGoogleChromeInstallSubDir1[] = L"Google";
const wchar_t kGoogleChromeInstallSubDir2[] = L"Chrome";
const wchar_t kInstallBinaryDir[] = L"Application";
+const wchar_t kInstallerDir[] = L"Installer";
const wchar_t kInstallUserDataDir[] = L"User Data";
-const wchar_t kChromeExe[] = L"chrome.exe";
-const wchar_t kChromeOldExe[] = L"old_chrome.exe";
-const wchar_t kChromeNewExe[] = L"new_chrome.exe";
const wchar_t kNaClExe[] = L"nacl64.exe";
-const wchar_t kChromeDll[] = L"chrome.dll";
-const wchar_t kChromeNaCl64Dll[] = L"nacl64.dll";
-const wchar_t kChromeFrameDll[] = L"npchrome_frame.dll";
const wchar_t kSetupExe[] = L"setup.exe";
-const wchar_t kInstallerDir[] = L"Installer";
const wchar_t kSxSSuffix[] = L" SxS";
-
const wchar_t kUninstallStringField[] = L"UninstallString";
const wchar_t kUninstallArgumentsField[] = L"UninstallArguments";
const wchar_t kUninstallDisplayNameField[] = L"DisplayName";
diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h
index 5f3359d..ed22874 100644
--- a/chrome/installer/util/util_constants.h
+++ b/chrome/installer/util/util_constants.h
@@ -84,26 +84,27 @@ extern const wchar_t kSystemLevelToast[];
extern const wchar_t kToastResultsKey[];
} // namespace switches
+extern const wchar_t kChromeDll[];
+extern const wchar_t kChromeExe[];
+extern const wchar_t kChromeFrameDll[];
+extern const wchar_t kChromeFrameHelperExe[];
+extern const wchar_t kChromeFrameHelperWndClass[];
+extern const wchar_t kChromeNaCl64Dll[];
+extern const wchar_t kChromeOldExe[];
+extern const wchar_t kChromeNewExe[];
extern const wchar_t kGoogleChromeInstallSubDir1[];
extern const wchar_t kGoogleChromeInstallSubDir2[];
extern const wchar_t kInstallBinaryDir[];
+extern const wchar_t kInstallerDir[];
extern const wchar_t kInstallUserDataDir[];
-extern const wchar_t kChromeExe[];
-extern const wchar_t kChromeOldExe[];
-extern const wchar_t kChromeNewExe[];
extern const wchar_t kNaClExe[];
-extern const wchar_t kChromeDll[];
-extern const wchar_t kChromeNaCl64Dll[];
-extern const wchar_t kChromeFrameDll[];
extern const wchar_t kSetupExe[];
-extern const wchar_t kInstallerDir[];
extern const wchar_t kSxSSuffix[];
-
-extern const wchar_t kUninstallStringField[];
extern const wchar_t kUninstallArgumentsField[];
extern const wchar_t kUninstallDisplayNameField[];
-extern const char kUninstallMetricsName[];
extern const wchar_t kUninstallInstallationDate[];
+extern const char kUninstallMetricsName[];
+extern const wchar_t kUninstallStringField[];
} // namespace installer_util