Index: base/process/kill_win.cc |
diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc |
index 3c93047f5b04b3d0d5eb747f0021912c717a2ce1..0da3a26ae4f78e9af924609904e81db7872958e2 100644 |
--- a/base/process/kill_win.cc |
+++ b/base/process/kill_win.cc |
@@ -38,12 +38,12 @@ static const int kWaitInterval = 2000; |
class TimerExpiredTask : public win::ObjectWatcher::Delegate { |
public: |
explicit TimerExpiredTask(Process process); |
- ~TimerExpiredTask(); |
+ ~TimerExpiredTask() override; |
void TimedOut(); |
// MessageLoop::Watcher ----------------------------------------------------- |
- virtual void OnObjectSignaled(HANDLE object); |
+ void OnObjectSignaled(HANDLE object) override; |
private: |
void KillProcess(); |
@@ -81,7 +81,7 @@ void TimerExpiredTask::KillProcess() { |
// terminates. We just care that it eventually terminates, and that's what |
// TerminateProcess should do for us. Don't check for the result code since |
// it fails quite often. This should be investigated eventually. |
- base::KillProcess(process_.Handle(), kProcessKilledExitCode, false); |
+ process_.Terminate(kProcessKilledExitCode, false); |
// Now, just cleanup as if the process exited normally. |
OnObjectSignaled(process_.Handle()); |
@@ -89,18 +89,6 @@ void TimerExpiredTask::KillProcess() { |
} // namespace |
-bool KillProcess(ProcessHandle process, int exit_code, bool wait) { |
- bool result = (TerminateProcess(process, exit_code) != FALSE); |
- if (result && wait) { |
- // The process may not end immediately due to pending I/O |
- if (WAIT_OBJECT_0 != WaitForSingleObject(process, 60 * 1000)) |
- DPLOG(ERROR) << "Error waiting for process exit"; |
- } else if (!result) { |
- DPLOG(ERROR) << "Unable to terminate process"; |
- } |
- return result; |
-} |
- |
TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) { |
DWORD tmp_exit_code = 0; |