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 // This file contains methods to iterate over processes on the system. | 5 // This file contains methods to iterate over processes on the system. |
6 | 6 |
7 #ifndef BASE_PROCESS_PROCESS_ITERATOR_H_ | 7 #ifndef BASE_PROCESS_PROCESS_ITERATOR_H_ |
8 #define BASE_PROCESS_PROCESS_ITERATOR_H_ | 8 #define BASE_PROCESS_PROCESS_ITERATOR_H_ |
9 | 9 |
| 10 #include <stddef.h> |
| 11 |
10 #include <list> | 12 #include <list> |
11 #include <string> | 13 #include <string> |
12 #include <vector> | 14 #include <vector> |
13 | 15 |
14 #include "base/base_export.h" | 16 #include "base/base_export.h" |
15 #include "base/basictypes.h" | |
16 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
| 18 #include "base/macros.h" |
17 #include "base/process/process.h" | 19 #include "base/process/process.h" |
18 #include "build/build_config.h" | 20 #include "build/build_config.h" |
19 | 21 |
20 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
21 #include <windows.h> | 23 #include <windows.h> |
22 #include <tlhelp32.h> | 24 #include <tlhelp32.h> |
23 #elif defined(OS_MACOSX) || defined(OS_OPENBSD) | 25 #elif defined(OS_MACOSX) || defined(OS_OPENBSD) |
24 #include <sys/sysctl.h> | 26 #include <sys/sysctl.h> |
25 #elif defined(OS_FREEBSD) | 27 #elif defined(OS_FREEBSD) |
26 #include <sys/user.h> | 28 #include <sys/user.h> |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 141 |
140 // Returns the number of processes on the machine that are running from the | 142 // Returns the number of processes on the machine that are running from the |
141 // given executable name. If filter is non-null, then only processes selected | 143 // given executable name. If filter is non-null, then only processes selected |
142 // by the filter will be counted. | 144 // by the filter will be counted. |
143 BASE_EXPORT int GetProcessCount(const FilePath::StringType& executable_name, | 145 BASE_EXPORT int GetProcessCount(const FilePath::StringType& executable_name, |
144 const ProcessFilter* filter); | 146 const ProcessFilter* filter); |
145 | 147 |
146 } // namespace base | 148 } // namespace base |
147 | 149 |
148 #endif // BASE_PROCESS_PROCESS_ITERATOR_H_ | 150 #endif // BASE_PROCESS_PROCESS_ITERATOR_H_ |
OLD | NEW |