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

Side by Side Diff: base/process/process_handle.h

Issue 868543002: Move OpenProcessHandle to Process::Open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « base/process/process.h ('k') | base/process/process_handle_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef BASE_PROCESS_PROCESS_HANDLE_H_ 5 #ifndef BASE_PROCESS_PROCESS_HANDLE_H_
6 #define BASE_PROCESS_PROCESS_HANDLE_H_ 6 #define BASE_PROCESS_PROCESS_HANDLE_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 22 matching lines...) Expand all
33 const ProcessHandle kNullProcessHandle = 0; 33 const ProcessHandle kNullProcessHandle = 0;
34 const ProcessId kNullProcessId = 0; 34 const ProcessId kNullProcessId = 0;
35 #endif // defined(OS_WIN) 35 #endif // defined(OS_WIN)
36 36
37 // Returns the id of the current process. 37 // Returns the id of the current process.
38 BASE_EXPORT ProcessId GetCurrentProcId(); 38 BASE_EXPORT ProcessId GetCurrentProcId();
39 39
40 // Returns the ProcessHandle of the current process. 40 // Returns the ProcessHandle of the current process.
41 BASE_EXPORT ProcessHandle GetCurrentProcessHandle(); 41 BASE_EXPORT ProcessHandle GetCurrentProcessHandle();
42 42
43 // Converts a PID to a process handle. This handle must be closed by 43
44 // CloseProcessHandle when you are done with it. Returns true on success.
45 BASE_EXPORT bool OpenProcessHandle(ProcessId pid, ProcessHandle* handle);
46 44
47 // Closes the process handle opened by OpenProcessHandle. 45 // Closes the process handle opened by OpenProcessHandle.
48 BASE_EXPORT void CloseProcessHandle(ProcessHandle process); 46 BASE_EXPORT void CloseProcessHandle(ProcessHandle process);
49 47
50 // Returns the unique ID for the specified process. This is functionally the 48 // Returns the unique ID for the specified process. This is functionally the
51 // same as Windows' GetProcessId(), but works on versions of Windows before 49 // same as Windows' GetProcessId(), but works on versions of Windows before
52 // Win XP SP1 as well. 50 // Win XP SP1 as well.
53 BASE_EXPORT ProcessId GetProcId(ProcessHandle process); 51 BASE_EXPORT ProcessId GetProcId(ProcessHandle process);
54 52
55 #if defined(OS_WIN) 53 #if defined(OS_WIN)
(...skipping 14 matching lines...) Expand all
70 // Returns the path to the executable of the given process. 68 // Returns the path to the executable of the given process.
71 BASE_EXPORT FilePath GetProcessExecutablePath(ProcessHandle process); 69 BASE_EXPORT FilePath GetProcessExecutablePath(ProcessHandle process);
72 70
73 // Returns the ID for the parent of the given process. 71 // Returns the ID for the parent of the given process.
74 BASE_EXPORT ProcessId GetParentProcessId(ProcessHandle process); 72 BASE_EXPORT ProcessId GetParentProcessId(ProcessHandle process);
75 #endif 73 #endif
76 74
77 } // namespace base 75 } // namespace base
78 76
79 #endif // BASE_PROCESS_PROCESS_HANDLE_H_ 77 #endif // BASE_PROCESS_PROCESS_HANDLE_H_
OLDNEW
« no previous file with comments | « base/process/process.h ('k') | base/process/process_handle_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698