diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-01 09:19:37 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-01 09:19:37 +0000 |
commit | 43cf325be09379594dd96e0b35146585cdfd6a34 (patch) | |
tree | 46401fd401988a049d3b12bea27132b7889b1986 /base/process.h | |
parent | 744121a2bf4ccf78a95cd816e696c0fc7f2551a5 (diff) | |
download | chromium_src-43cf325be09379594dd96e0b35146585cdfd6a34.zip chromium_src-43cf325be09379594dd96e0b35146585cdfd6a34.tar.gz chromium_src-43cf325be09379594dd96e0b35146585cdfd6a34.tar.bz2 |
Use portable typedef for PIDs (process IDs).
This is a preparation to land http://codereview.chromium.org/54003,
which replaces chrome_process_filter with more portable chrome_process_util.
Review URL: http://codereview.chromium.org/57062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process.h')
-rw-r--r-- | base/process.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/process.h b/base/process.h index de26939..312f84c 100644 --- a/base/process.h +++ b/base/process.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" +#include <sys/types.h> #ifdef OS_WIN #include <windows.h> #endif @@ -15,11 +16,14 @@ namespace base { // ProcessHandle is a platform specific type which represents the underlying OS // handle to a process. +// ProcessId is a number which identifies the process in the OS. #if defined(OS_WIN) typedef HANDLE ProcessHandle; +typedef DWORD ProcessId; #elif defined(OS_POSIX) // On POSIX, our ProcessHandle will just be the PID. -typedef int ProcessHandle; +typedef pid_t ProcessHandle; +typedef pid_t ProcessId; #endif class Process { @@ -37,7 +41,7 @@ class Process { void set_handle(ProcessHandle handle) { process_ = handle; } // Get the PID for this process. - int32 pid() const; + ProcessId pid() const; // Is the this process the current process. bool is_current() const; |