| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/test/test_process_killer_win.h" | 5 #include "base/test/test_process_killer_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <winternl.h> | 8 #include <winternl.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/process_util.h" | 13 #include "base/process/kill.h" |
| 14 #include "base/process/process_iterator.h" |
| 14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 15 #include "base/win/scoped_handle.h" | 16 #include "base/win/scoped_handle.h" |
| 16 | 17 |
| 17 namespace { | 18 namespace { |
| 18 | 19 |
| 19 typedef LONG WINAPI | 20 typedef LONG WINAPI |
| 20 NtQueryInformationProcess( | 21 NtQueryInformationProcess( |
| 21 IN HANDLE ProcessHandle, | 22 IN HANDLE ProcessHandle, |
| 22 IN PROCESSINFOCLASS ProcessInformationClass, | 23 IN PROCESSINFOCLASS ProcessInformationClass, |
| 23 OUT PVOID ProcessInformation, | 24 OUT PVOID ProcessInformation, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 158 |
| 158 namespace base { | 159 namespace base { |
| 159 | 160 |
| 160 bool KillAllNamedProcessesWithArgument(const string16& process_name, | 161 bool KillAllNamedProcessesWithArgument(const string16& process_name, |
| 161 const string16& argument) { | 162 const string16& argument) { |
| 162 ArgumentFilter argument_filter(argument); | 163 ArgumentFilter argument_filter(argument); |
| 163 return base::KillProcesses(process_name, 0, &argument_filter); | 164 return base::KillProcesses(process_name, 0, &argument_filter); |
| 164 } | 165 } |
| 165 | 166 |
| 166 } // namespace base | 167 } // namespace base |
| OLD | NEW |