| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include <sys/types.h> | 30 #include <sys/types.h> |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 #include <list> | 33 #include <list> |
| 34 #include <set> | 34 #include <set> |
| 35 #include <string> | 35 #include <string> |
| 36 #include <utility> | 36 #include <utility> |
| 37 #include <vector> | 37 #include <vector> |
| 38 | 38 |
| 39 #include "base/base_export.h" | 39 #include "base/base_export.h" |
| 40 #include "base/file_descriptor_shuffle.h" | |
| 41 #include "base/file_path.h" | 40 #include "base/file_path.h" |
| 42 #include "base/process.h" | 41 #include "base/process.h" |
| 43 | 42 |
| 43 #if defined(OS_POSIX) |
| 44 #include "base/posix/file_descriptor_shuffle.h" |
| 45 #endif |
| 46 |
| 44 class CommandLine; | 47 class CommandLine; |
| 45 | 48 |
| 46 namespace base { | 49 namespace base { |
| 47 | 50 |
| 48 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
| 49 struct ProcessEntry : public PROCESSENTRY32 { | 52 struct ProcessEntry : public PROCESSENTRY32 { |
| 50 ProcessId pid() const { return th32ProcessID; } | 53 ProcessId pid() const { return th32ProcessID; } |
| 51 ProcessId parent_pid() const { return th32ParentProcessID; } | 54 ProcessId parent_pid() const { return th32ParentProcessID; } |
| 52 const wchar_t* exe_file() const { return szExeFile; } | 55 const wchar_t* exe_file() const { return szExeFile; } |
| 53 }; | 56 }; |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. | 874 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. |
| 872 // | 875 // |
| 873 // TODO(shess): Weird place to put it, but this is where the OOM | 876 // TODO(shess): Weird place to put it, but this is where the OOM |
| 874 // killer currently lives. | 877 // killer currently lives. |
| 875 BASE_EXPORT void* UncheckedMalloc(size_t size); | 878 BASE_EXPORT void* UncheckedMalloc(size_t size); |
| 876 #endif // defined(OS_MACOSX) | 879 #endif // defined(OS_MACOSX) |
| 877 | 880 |
| 878 } // namespace base | 881 } // namespace base |
| 879 | 882 |
| 880 #endif // BASE_PROCESS_UTIL_H_ | 883 #endif // BASE_PROCESS_UTIL_H_ |
| OLD | NEW |