| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const uint32 kProcessAccessSetQuota = PROCESS_SET_QUOTA; | 74 const uint32 kProcessAccessSetQuota = PROCESS_SET_QUOTA; |
| 75 const uint32 kProcessAccessSetInformation = PROCESS_SET_INFORMATION; | 75 const uint32 kProcessAccessSetInformation = PROCESS_SET_INFORMATION; |
| 76 const uint32 kProcessAccessQueryInformation = PROCESS_QUERY_INFORMATION; | 76 const uint32 kProcessAccessQueryInformation = PROCESS_QUERY_INFORMATION; |
| 77 const uint32 kProcessAccessSuspendResume = PROCESS_SUSPEND_RESUME; | 77 const uint32 kProcessAccessSuspendResume = PROCESS_SUSPEND_RESUME; |
| 78 const uint32 kProcessAccessQueryLimitedInfomation = | 78 const uint32 kProcessAccessQueryLimitedInfomation = |
| 79 PROCESS_QUERY_LIMITED_INFORMATION; | 79 PROCESS_QUERY_LIMITED_INFORMATION; |
| 80 const uint32 kProcessAccessWaitForTermination = SYNCHRONIZE; | 80 const uint32 kProcessAccessWaitForTermination = SYNCHRONIZE; |
| 81 #elif defined(OS_POSIX) | 81 #elif defined(OS_POSIX) |
| 82 | 82 |
| 83 struct ProcessEntry { | 83 struct ProcessEntry { |
| 84 ProcessEntry(); |
| 85 ~ProcessEntry(); |
| 86 |
| 84 ProcessId pid_; | 87 ProcessId pid_; |
| 85 ProcessId ppid_; | 88 ProcessId ppid_; |
| 86 ProcessId gid_; | 89 ProcessId gid_; |
| 87 std::string exe_file_; | 90 std::string exe_file_; |
| 88 std::vector<std::string> cmd_line_args_; | 91 std::vector<std::string> cmd_line_args_; |
| 89 | 92 |
| 90 ProcessId pid() const { return pid_; } | 93 ProcessId pid() const { return pid_; } |
| 91 ProcessId parent_pid() const { return ppid_; } | 94 ProcessId parent_pid() const { return ppid_; } |
| 92 ProcessId gid() const { return gid_; } | 95 ProcessId gid() const { return gid_; } |
| 93 const char* exe_file() const { return exe_file_.c_str(); } | 96 const char* exe_file() const { return exe_file_.c_str(); } |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 // instance running inside the parent. The parent's Breakpad instance should | 670 // instance running inside the parent. The parent's Breakpad instance should |
| 668 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler | 671 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
| 669 // in the child after forking will restore the standard exception handler. | 672 // in the child after forking will restore the standard exception handler. |
| 670 // See http://crbug.com/20371/ for more details. | 673 // See http://crbug.com/20371/ for more details. |
| 671 void RestoreDefaultExceptionHandler(); | 674 void RestoreDefaultExceptionHandler(); |
| 672 #endif // defined(OS_MACOSX) | 675 #endif // defined(OS_MACOSX) |
| 673 | 676 |
| 674 } // namespace base | 677 } // namespace base |
| 675 | 678 |
| 676 #endif // BASE_PROCESS_UTIL_H_ | 679 #endif // BASE_PROCESS_UTIL_H_ |
| OLD | NEW |