OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_util.h" |
6 | 6 |
7 namespace base { | 7 namespace base { |
8 | 8 |
| 9 #if defined(OS_POSIX) |
| 10 ProcessEntry::ProcessEntry() {} |
| 11 ProcessEntry::~ProcessEntry() {} |
| 12 #endif |
| 13 |
9 int GetProcessCount(const std::wstring& executable_name, | 14 int GetProcessCount(const std::wstring& executable_name, |
10 const ProcessFilter* filter) { | 15 const ProcessFilter* filter) { |
11 int count = 0; | 16 int count = 0; |
12 NamedProcessIterator iter(executable_name, filter); | 17 NamedProcessIterator iter(executable_name, filter); |
13 while (iter.NextProcessEntry()) | 18 while (iter.NextProcessEntry()) |
14 ++count; | 19 ++count; |
15 return count; | 20 return count; |
16 } | 21 } |
17 | 22 |
18 bool KillProcesses(const std::wstring& executable_name, int exit_code, | 23 bool KillProcesses(const std::wstring& executable_name, int exit_code, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, | 59 NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, |
55 const ProcessFilter* filter) | 60 const ProcessFilter* filter) |
56 : ProcessIterator(filter), | 61 : ProcessIterator(filter), |
57 executable_name_(executable_name) { | 62 executable_name_(executable_name) { |
58 } | 63 } |
59 | 64 |
60 NamedProcessIterator::~NamedProcessIterator() { | 65 NamedProcessIterator::~NamedProcessIterator() { |
61 } | 66 } |
62 | 67 |
63 } // namespace base | 68 } // namespace base |
OLD | NEW |