Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: base/process/kill.cc

Issue 18555002: Split out process killing functions from base/process_util.h into base/process/kill.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/process/kill.h ('k') | base/process/kill_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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/process_util.h" 5 #include "base/process/kill.h"
6
7 #include "base/process/process_iterator.h"
6 8
7 namespace base { 9 namespace base {
8 10
9 bool KillProcesses(const FilePath::StringType& executable_name, int exit_code, 11 bool KillProcesses(const FilePath::StringType& executable_name,
12 int exit_code,
10 const ProcessFilter* filter) { 13 const ProcessFilter* filter) {
11 bool result = true; 14 bool result = true;
12 NamedProcessIterator iter(executable_name, filter); 15 NamedProcessIterator iter(executable_name, filter);
13 while (const ProcessEntry* entry = iter.NextProcessEntry()) { 16 while (const ProcessEntry* entry = iter.NextProcessEntry()) {
14 #if defined(OS_WIN) 17 #if defined(OS_WIN)
15 result &= KillProcessById(entry->pid(), exit_code, true); 18 result &= KillProcessById(entry->pid(), exit_code, true);
16 #else 19 #else
17 result &= KillProcess(entry->pid(), exit_code, true); 20 result &= KillProcess(entry->pid(), exit_code, true);
18 #endif 21 #endif
19 } 22 }
20 return result; 23 return result;
21 } 24 }
22 25
23 } // namespace base 26 } // namespace base
OLDNEW
« no previous file with comments | « base/process/kill.h ('k') | base/process/kill_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698