diff options
author | rvargas <rvargas@chromium.org> | 2015-03-31 21:10:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-01 04:11:15 +0000 |
commit | f8d789c4558c7575f4d388d44730d18fdf15772c (patch) | |
tree | 54807f725d613c10d0026a98cedb89189bef1a06 /base | |
parent | d65edb7b2d228497056e18100c882f7cf7d59c36 (diff) | |
download | chromium_src-f8d789c4558c7575f4d388d44730d18fdf15772c.zip chromium_src-f8d789c4558c7575f4d388d44730d18fdf15772c.tar.gz chromium_src-f8d789c4558c7575f4d388d44730d18fdf15772c.tar.bz2 |
Remove uses of KillProcess.
BUG=417532
Review URL: https://codereview.chromium.org/1035323002
Cr-Commit-Position: refs/heads/master@{#323179}
Diffstat (limited to 'base')
-rw-r--r-- | base/process/kill.cc | 2 | ||||
-rw-r--r-- | base/process/kill_win.cc | 2 | ||||
-rw-r--r-- | base/process/launch_win.cc | 3 | ||||
-rw-r--r-- | base/test/launcher/test_launcher.cc | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/base/process/kill.cc b/base/process/kill.cc index a647d96..5d8ba6a 100644 --- a/base/process/kill.cc +++ b/base/process/kill.cc @@ -15,7 +15,7 @@ bool KillProcesses(const FilePath::StringType& executable_name, NamedProcessIterator iter(executable_name, filter); while (const ProcessEntry* entry = iter.NextProcessEntry()) { Process process = Process::Open(entry->pid()); - result &= KillProcess(process.Handle(), exit_code, true); + result &= process.Terminate(exit_code, true); } return result; } diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc index 3c93047..f8dc94e 100644 --- a/base/process/kill_win.cc +++ b/base/process/kill_win.cc @@ -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()); diff --git a/base/process/launch_win.cc b/base/process/launch_win.cc index c2bd295..ebc19b8 100644 --- a/base/process/launch_win.cc +++ b/base/process/launch_win.cc @@ -219,7 +219,8 @@ Process LaunchProcess(const string16& cmdline, if (0 == AssignProcessToJobObject(options.job_handle, process_info.process_handle())) { DLOG(ERROR) << "Could not AssignProcessToObject."; - KillProcess(process_info.process_handle(), kProcessKilledExitCode, true); + Process scoped_process(process_info.TakeProcessHandle()); + scoped_process.Terminate(kProcessKilledExitCode, true); return Process(); } diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc index 1d48060..0b09004 100644 --- a/base/test/launcher/test_launcher.cc +++ b/base/test/launcher/test_launcher.cc @@ -310,7 +310,7 @@ int LaunchChildTestProcessWithOptions(const CommandLine& command_line, exit_code = -1; // Set a non-zero exit code to signal a failure. // Ensure that the process terminates. - KillProcess(process.Handle(), -1, true); + process.Terminate(-1, true); } { |