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

Side by Side Diff: base/process/process.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/memory/scoped_open_process.h ('k') | base/process/process_handle.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PROCESS_H_ 5 #ifndef BASE_PROCESS_PROCESS_PROCESS_H_
6 #define BASE_PROCESS_PROCESS_PROCESS_H_ 6 #define BASE_PROCESS_PROCESS_PROCESS_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/move.h" 10 #include "base/move.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // The destructor does not terminate the process. 43 // The destructor does not terminate the process.
44 ~Process() {} 44 ~Process() {}
45 45
46 // Move operator= for C++03 move emulation of this type. 46 // Move operator= for C++03 move emulation of this type.
47 Process& operator=(RValue other); 47 Process& operator=(RValue other);
48 48
49 // Returns an object for the current process. 49 // Returns an object for the current process.
50 static Process Current(); 50 static Process Current();
51 51
52 // Returns a Process for the given |pid|.
53 static Process Open(ProcessId pid);
54
52 // Returns a Process for the given |pid|. On Windows the handle is opened 55 // Returns a Process for the given |pid|. On Windows the handle is opened
53 // with more access rights and must only be used by trusted code (can read the 56 // with more access rights and must only be used by trusted code (can read the
54 // address space and duplicate handles). 57 // address space and duplicate handles).
55 static Process OpenWithExtraPriviles(ProcessId pid); 58 static Process OpenWithExtraPriviles(ProcessId pid);
56 59
57 #if defined(OS_WIN) 60 #if defined(OS_WIN)
58 // Returns a Process for the given |pid|, using some |desired_access|. 61 // Returns a Process for the given |pid|, using some |desired_access|.
59 // See ::OpenProcess documentation for valid |desired_access|. 62 // See ::OpenProcess documentation for valid |desired_access|.
60 static Process OpenWithAccess(ProcessId pid, DWORD desired_access); 63 static Process OpenWithAccess(ProcessId pid, DWORD desired_access);
61 #endif 64 #endif
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool is_current_process_; 122 bool is_current_process_;
120 win::ScopedHandle process_; 123 win::ScopedHandle process_;
121 #else 124 #else
122 ProcessHandle process_; 125 ProcessHandle process_;
123 #endif 126 #endif
124 }; 127 };
125 128
126 } // namespace base 129 } // namespace base
127 130
128 #endif // BASE_PROCESS_PROCESS_PROCESS_H_ 131 #endif // BASE_PROCESS_PROCESS_PROCESS_H_
OLDNEW
« no previous file with comments | « base/memory/scoped_open_process.h ('k') | base/process/process_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698