| 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 <list> | 10 #include <list> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/base_export.h" |
| 15 #include "base/basictypes.h" |
| 16 #include "base/files/file_path.h" |
| 17 #include "base/process/process.h" |
| 14 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 15 #include "base/basictypes.h" | |
| 16 #include "base/base_export.h" | |
| 17 #include "base/files/file_path.h" | |
| 18 #include "base/process.h" | |
| 19 | 19 |
| 20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
| 21 #include <windows.h> | 21 #include <windows.h> |
| 22 #include <tlhelp32.h> | 22 #include <tlhelp32.h> |
| 23 #elif defined(OS_MACOSX) || defined(OS_BSD) | 23 #elif defined(OS_MACOSX) || defined(OS_BSD) |
| 24 #include <sys/sysctl.h> | 24 #include <sys/sysctl.h> |
| 25 #elif defined(OS_POSIX) | 25 #elif defined(OS_POSIX) |
| 26 #include <dirent.h> | 26 #include <dirent.h> |
| 27 #endif | 27 #endif |
| 28 | 28 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 // Returns the number of processes on the machine that are running from the | 175 // Returns the number of processes on the machine that are running from the |
| 176 // given executable name. If filter is non-null, then only processes selected | 176 // given executable name. If filter is non-null, then only processes selected |
| 177 // by the filter will be counted. | 177 // by the filter will be counted. |
| 178 BASE_EXPORT int GetProcessCount(const FilePath::StringType& executable_name, | 178 BASE_EXPORT int GetProcessCount(const FilePath::StringType& executable_name, |
| 179 const ProcessFilter* filter); | 179 const ProcessFilter* filter); |
| 180 | 180 |
| 181 } // namespace base | 181 } // namespace base |
| 182 | 182 |
| 183 #endif // BASE_PROCESS_PROCESS_ITERATOR_H_ | 183 #endif // BASE_PROCESS_PROCESS_ITERATOR_H_ |
| OLD | NEW |