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 // This file/namespace contains utility functions for enumerating, ending and | 5 // This file/namespace contains utility functions for enumerating, ending and |
6 // computing statistics of processes. | 6 // computing statistics of processes. |
7 | 7 |
8 #ifndef BASE_PROCESS_UTIL_H_ | 8 #ifndef BASE_PROCESS_UTIL_H_ |
9 #define BASE_PROCESS_UTIL_H_ | 9 #define BASE_PROCESS_UTIL_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include <dirent.h> | 26 #include <dirent.h> |
27 #include <limits.h> | 27 #include <limits.h> |
28 #include <sys/types.h> | 28 #include <sys/types.h> |
29 #endif | 29 #endif |
30 | 30 |
31 #include <list> | 31 #include <list> |
32 #include <string> | 32 #include <string> |
33 #include <utility> | 33 #include <utility> |
34 #include <vector> | 34 #include <vector> |
35 | 35 |
36 #include "base/command_line.h" | |
37 #include "base/file_descriptor_shuffle.h" | 36 #include "base/file_descriptor_shuffle.h" |
38 #include "base/file_path.h" | |
39 #include "base/process.h" | 37 #include "base/process.h" |
40 | 38 |
41 #ifndef NAME_MAX // Solaris and some BSDs have no NAME_MAX | 39 #ifndef NAME_MAX // Solaris and some BSDs have no NAME_MAX |
42 #ifdef MAXNAMLEN | 40 #ifdef MAXNAMLEN |
43 #define NAME_MAX MAXNAMLEN | 41 #define NAME_MAX MAXNAMLEN |
44 #else | 42 #else |
45 #define NAME_MAX 256 | 43 #define NAME_MAX 256 |
46 #endif | 44 #endif |
47 #endif | 45 #endif |
48 | 46 |
| 47 class CommandLine; |
| 48 class FilePath; |
| 49 |
49 namespace base { | 50 namespace base { |
50 | 51 |
51 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
52 | 53 |
53 struct ProcessEntry : public PROCESSENTRY32 { | 54 struct ProcessEntry : public PROCESSENTRY32 { |
54 ProcessId pid() const { return th32ProcessID; } | 55 ProcessId pid() const { return th32ProcessID; } |
55 ProcessId parent_pid() const { return th32ParentProcessID; } | 56 ProcessId parent_pid() const { return th32ParentProcessID; } |
56 const wchar_t* exe_file() const { return szExeFile; } | 57 const wchar_t* exe_file() const { return szExeFile; } |
57 }; | 58 }; |
58 | 59 |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // instance running inside the parent. The parent's Breakpad instance should | 594 // instance running inside the parent. The parent's Breakpad instance should |
594 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler | 595 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
595 // in the child after forking will restore the standard exception handler. | 596 // in the child after forking will restore the standard exception handler. |
596 // See http://crbug.com/20371/ for more details. | 597 // See http://crbug.com/20371/ for more details. |
597 void RestoreDefaultExceptionHandler(); | 598 void RestoreDefaultExceptionHandler(); |
598 #endif // defined(OS_MACOSX) | 599 #endif // defined(OS_MACOSX) |
599 | 600 |
600 } // namespace base | 601 } // namespace base |
601 | 602 |
602 #endif // BASE_PROCESS_UTIL_H_ | 603 #endif // BASE_PROCESS_UTIL_H_ |
OLD | NEW |