summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-18 18:45:18 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-18 18:45:18 +0000
commit5a22409d7b625fa1f2a03194ff6c011f82f150dc (patch)
tree63ac7068246bbdcb9b0577fd19cac84892a68f8c /chrome/installer/util
parent453ff92faa1e8d7af2377e1f1fea1f8210ca36a6 (diff)
downloadchromium_src-5a22409d7b625fa1f2a03194ff6c011f82f150dc.zip
chromium_src-5a22409d7b625fa1f2a03194ff6c011f82f150dc.tar.gz
chromium_src-5a22409d7b625fa1f2a03194ff6c011f82f150dc.tar.bz2
Make uninstall slightly less prone to chrome.exe crashes by changing default to uninstall confirmation.
BUG=1215 Review URL: http://codereview.chromium.org/3128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util')
-rw-r--r--chrome/installer/util/helper.cc17
-rw-r--r--chrome/installer/util/helper.h11
2 files changed, 8 insertions, 20 deletions
diff --git a/chrome/installer/util/helper.cc b/chrome/installer/util/helper.cc
index 68fa646..3d86c8d 100644
--- a/chrome/installer/util/helper.cc
+++ b/chrome/installer/util/helper.cc
@@ -44,9 +44,7 @@ bool installer::LaunchChrome(bool system_install) {
bool installer::LaunchChromeAndWaitForResult(bool system_install,
const std::wstring& options,
- int32 timeout_ms,
- int32* exit_code,
- bool* is_timeout) {
+ int32* exit_code) {
std::wstring chrome_exe(installer::GetChromeInstallPath(system_install));
if (chrome_exe.empty())
return false;
@@ -63,16 +61,9 @@ bool installer::LaunchChromeAndWaitForResult(bool system_install,
return false;
}
- DWORD wr = ::WaitForSingleObject(pi.hProcess, timeout_ms);
- if (WAIT_TIMEOUT == wr) {
- if (is_timeout)
- *is_timeout = true;
- } else { // WAIT_OBJECT_0
- if (is_timeout)
- *is_timeout = false;
- if (exit_code) {
- ::GetExitCodeProcess(pi.hProcess, reinterpret_cast<DWORD*>(exit_code));
- }
+ DWORD wr = ::WaitForSingleObject(pi.hProcess, INFINITE);
+ if (exit_code) {
+ ::GetExitCodeProcess(pi.hProcess, reinterpret_cast<DWORD*>(exit_code));
}
::CloseHandle(pi.hProcess);
diff --git a/chrome/installer/util/helper.h b/chrome/installer/util/helper.h
index c530615..c4678b5 100644
--- a/chrome/installer/util/helper.h
+++ b/chrome/installer/util/helper.h
@@ -21,16 +21,13 @@ std::wstring GetChromeInstallPath(bool system_install);
// Launches Chrome without waiting for its exit.
bool LaunchChrome(bool system_install);
-// Launches Chrome with given command line, waits for Chrome to terminate
-// within timeout_ms, and gets the process exit code if available.
+// Launches Chrome with given command line, waits for Chrome indefinitely
+// (until it terminates), and gets the process exit code if available.
// The function returns true as long as Chrome is successfully launched.
-// The status of Chrome at the return of the function is given by exit_code
-// and is_timeout.
+// The status of Chrome at the return of the function is given by exit_code.
bool LaunchChromeAndWaitForResult(bool system_install,
const std::wstring& options,
- int32 timeout_ms,
- int32* exit_code,
- bool* is_timeout);
+ int32* exit_code);
// This function tries to remove all previous version directories after a new
// Chrome update. If an instance of Chrome with older version is still running