OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/process_util.h" | |
6 | |
7 namespace base { | |
8 | |
9 bool KillProcesses(const FilePath::StringType& executable_name, int exit_code, | |
10 const ProcessFilter* filter) { | |
11 bool result = true; | |
12 NamedProcessIterator iter(executable_name, filter); | |
13 while (const ProcessEntry* entry = iter.NextProcessEntry()) { | |
14 #if defined(OS_WIN) | |
15 result &= KillProcessById(entry->pid(), exit_code, true); | |
16 #else | |
17 result &= KillProcess(entry->pid(), exit_code, true); | |
18 #endif | |
19 } | |
20 return result; | |
21 } | |
22 | |
23 } // namespace base | |
OLD | NEW |