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

Unified Diff: base/process/kill_win.cc

Issue 938453002: Remove base::WaitForSingleProcess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl format :( Created 5 years, 10 months 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
« no previous file with comments | « base/process/kill_posix.cc ('k') | base/process/process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/kill_win.cc
diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc
index f280c6fa1d8e05351f0d988e990055390a203f29..7daf5f868fb7d6f847789a078d5c7d5a27a049f9 100644
--- a/base/process/kill_win.cc
+++ b/base/process/kill_win.cc
@@ -189,7 +189,7 @@ bool WaitForExitCode(ProcessHandle handle, int* exit_code) {
bool WaitForExitCodeWithTimeout(ProcessHandle handle,
int* exit_code,
- base::TimeDelta timeout) {
+ TimeDelta timeout) {
if (::WaitForSingleObject(
handle, static_cast<DWORD>(timeout.InMilliseconds())) != WAIT_OBJECT_0)
return false;
@@ -202,7 +202,7 @@ bool WaitForExitCodeWithTimeout(ProcessHandle handle,
}
bool WaitForProcessesToExit(const FilePath::StringType& executable_name,
- base::TimeDelta wait,
+ TimeDelta wait,
const ProcessFilter* filter) {
bool result = true;
DWORD start_time = GetTickCount();
@@ -224,13 +224,8 @@ bool WaitForProcessesToExit(const FilePath::StringType& executable_name,
return result;
}
-bool WaitForSingleProcess(ProcessHandle handle, base::TimeDelta wait) {
- int exit_code;
- return WaitForExitCodeWithTimeout(handle, &exit_code, wait) && exit_code == 0;
-}
-
bool CleanupProcesses(const FilePath::StringType& executable_name,
- base::TimeDelta wait,
+ TimeDelta wait,
int exit_code,
const ProcessFilter* filter) {
if (WaitForProcessesToExit(executable_name, wait, filter))
@@ -249,9 +244,9 @@ void EnsureProcessTerminated(Process process) {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- base::Bind(&TimerExpiredTask::TimedOut,
- base::Owned(new TimerExpiredTask(process.Pass()))),
- base::TimeDelta::FromMilliseconds(kWaitInterval));
+ Bind(&TimerExpiredTask::TimedOut,
+ Owned(new TimerExpiredTask(process.Pass()))),
+ TimeDelta::FromMilliseconds(kWaitInterval));
}
} // namespace base
« no previous file with comments | « base/process/kill_posix.cc ('k') | base/process/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698