diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-06 00:19:17 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-06 00:19:17 +0000 |
commit | 5986ed239f7f2fc3f6b1d5f6385819151ae533db (patch) | |
tree | a07be3bc493c5dd34c5f62c6195a85c49ec22c2a /base/process_util_win.cc | |
parent | 8ad85c0ef39433a26a0093853f34d7eec9be0706 (diff) | |
download | chromium_src-5986ed239f7f2fc3f6b1d5f6385819151ae533db.zip chromium_src-5986ed239f7f2fc3f6b1d5f6385819151ae533db.tar.gz chromium_src-5986ed239f7f2fc3f6b1d5f6385819151ae533db.tar.bz2 |
Make ResourceMessageFilter compile on Mac. It stubs out a substantial part of
the printing. It creates new base functions for converting PIDs to handles, and
then closing them (since Windows requires this). This also fixes the formatting
of image_util.
Review URL: http://codereview.chromium.org/20109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_win.cc')
-rw-r--r-- | base/process_util_win.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/process_util_win.cc b/base/process_util_win.cc index f1fd72c..bb0e626 100644 --- a/base/process_util_win.cc +++ b/base/process_util_win.cc @@ -33,6 +33,14 @@ ProcessHandle GetCurrentProcessHandle() { return ::GetCurrentProcess(); } +ProcessHandle OpenProcessHandle(int pid) { + return OpenProcess(PROCESS_DUP_HANDLE | PROCESS_TERMINATE, FALSE, pid); +} + +void CloseProcessHandle(ProcessHandle process) { + CloseHandle(process); +} + // Helper for GetProcId() bool GetProcIdViaGetProcessId(ProcessHandle process, DWORD* id) { // Dynamically get a pointer to GetProcessId(). |