| OLD | NEW |
| 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_H_ | 5 #ifndef BASE_PROCESS_PROCESS_H_ |
| 6 #define BASE_PROCESS_PROCESS_H_ | 6 #define BASE_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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|. | 52 // Returns a Process for the given |pid|. |
| 53 static Process Open(ProcessId pid); | 53 static Process Open(ProcessId pid); |
| 54 | 54 |
| 55 // 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 |
| 56 // 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 |
| 57 // address space and duplicate handles). | 57 // address space and duplicate handles). |
| 58 static Process OpenWithExtraPriviles(ProcessId pid); | 58 static Process OpenWithExtraPrivileges(ProcessId pid); |
| 59 | 59 |
| 60 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
| 61 // Returns a Process for the given |pid|, using some |desired_access|. | 61 // Returns a Process for the given |pid|, using some |desired_access|. |
| 62 // See ::OpenProcess documentation for valid |desired_access|. | 62 // See ::OpenProcess documentation for valid |desired_access|. |
| 63 static Process OpenWithAccess(ProcessId pid, DWORD desired_access); | 63 static Process OpenWithAccess(ProcessId pid, DWORD desired_access); |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 // Creates an object from a |handle| owned by someone else. | 66 // Creates an object from a |handle| owned by someone else. |
| 67 // Don't use this for new code. It is only intended to ease the migration to | 67 // Don't use this for new code. It is only intended to ease the migration to |
| 68 // a strict ownership model. | 68 // a strict ownership model. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 bool is_current_process_; | 126 bool is_current_process_; |
| 127 win::ScopedHandle process_; | 127 win::ScopedHandle process_; |
| 128 #else | 128 #else |
| 129 ProcessHandle process_; | 129 ProcessHandle process_; |
| 130 #endif | 130 #endif |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace base | 133 } // namespace base |
| 134 | 134 |
| 135 #endif // BASE_PROCESS_PROCESS_H_ | 135 #endif // BASE_PROCESS_PROCESS_H_ |
| OLD | NEW |