Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4128)

Unified Diff: base/process_util.h

Issue 57062: Use portable typedef for PIDs (process IDs). (Closed)
Patch Set: speculative fix for win Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process_posix.cc ('k') | base/process_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util.h
diff --git a/base/process_util.h b/base/process_util.h
index 35a051a9c599952a63afdd543e3ed2f6f0647181..286330b8a5e73198c9086c74ffd4f93e0dc4da26 100644
--- a/base/process_util.h
+++ b/base/process_util.h
@@ -62,14 +62,14 @@ enum {
};
// Returns the id of the current process.
-int GetCurrentProcId();
+ProcessId GetCurrentProcId();
// Returns the ProcessHandle of the current process.
ProcessHandle GetCurrentProcessHandle();
// Converts a PID to a process handle. This handle must be closed by
// CloseProcessHandle when you are done with it.
-ProcessHandle OpenProcessHandle(int pid);
+ProcessHandle OpenProcessHandle(ProcessId pid);
// Closes the process handle opened by OpenProcessHandle.
void CloseProcessHandle(ProcessHandle process);
@@ -77,7 +77,7 @@ void CloseProcessHandle(ProcessHandle process);
// Returns the unique ID for the specified process. This is functionally the
// same as Windows' GetProcessId(), but works on versions of Windows before
// Win XP SP1 as well.
-int GetProcId(ProcessHandle process);
+ProcessId GetProcId(ProcessHandle process);
#if defined(OS_POSIX)
// Sets all file descriptors to close on exec except for stdin, stdout
@@ -129,7 +129,7 @@ class ProcessFilter {
public:
// Returns true to indicate set-inclusion and false otherwise. This method
// should not have side-effects and should be idempotent.
- virtual bool Includes(uint32 pid, uint32 parent_pid) const = 0;
+ virtual bool Includes(ProcessId pid, ProcessId parent_pid) const = 0;
virtual ~ProcessFilter() { }
};
@@ -153,7 +153,7 @@ bool KillProcesses(const std::wstring& executable_name, int exit_code,
// Returns true if this is successful, false otherwise.
bool KillProcess(ProcessHandle process, int exit_code, bool wait);
#if defined(OS_WIN)
-bool KillProcessById(DWORD process_id, int exit_code, bool wait);
+bool KillProcessById(ProcessId process_id, int exit_code, bool wait);
#endif
// Get the termination status (exit code) of the process and return true if the
« no previous file with comments | « base/process_posix.cc ('k') | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698