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_util.h" |
14 #include "base/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/win/scoped_handle.h" | 15 #include "base/win/scoped_handle.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 typedef LONG WINAPI | 19 typedef LONG WINAPI |
20 NtQueryInformationProcess( | 20 NtQueryInformationProcess( |
21 IN HANDLE ProcessHandle, | 21 IN HANDLE ProcessHandle, |
22 IN PROCESSINFOCLASS ProcessInformationClass, | 22 IN PROCESSINFOCLASS ProcessInformationClass, |
23 OUT PVOID ProcessInformation, | 23 OUT PVOID ProcessInformation, |
24 IN ULONG ProcessInformationLength, | 24 IN ULONG ProcessInformationLength, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 namespace base { | 158 namespace base { |
159 | 159 |
160 bool KillAllNamedProcessesWithArgument(const string16& process_name, | 160 bool KillAllNamedProcessesWithArgument(const string16& process_name, |
161 const string16& argument) { | 161 const string16& argument) { |
162 ArgumentFilter argument_filter(argument); | 162 ArgumentFilter argument_filter(argument); |
163 return base::KillProcesses(process_name, 0, &argument_filter); | 163 return base::KillProcesses(process_name, 0, &argument_filter); |
164 } | 164 } |
165 | 165 |
166 } // namespace base | 166 } // namespace base |
OLD | NEW |