summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
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