OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 SANDBOX_SRC_TARGET_PROCESS_H__ | 5 #ifndef SANDBOX_SRC_TARGET_PROCESS_H__ |
6 #define SANDBOX_SRC_TARGET_PROCESS_H__ | 6 #define SANDBOX_SRC_TARGET_PROCESS_H__ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 DWORD ProcessId() const { | 74 DWORD ProcessId() const { |
75 return sandbox_process_info_.process_id(); | 75 return sandbox_process_info_.process_id(); |
76 } | 76 } |
77 | 77 |
78 // Returns the handle to the main thread. | 78 // Returns the handle to the main thread. |
79 HANDLE MainThread() const { | 79 HANDLE MainThread() const { |
80 return sandbox_process_info_.thread_handle(); | 80 return sandbox_process_info_.thread_handle(); |
81 } | 81 } |
82 | 82 |
83 // Transfers a 32-bit variable between the broker and the target. | 83 // Transfers a 32-bit variable between the broker and the target. |
84 ResultCode TransferVariable(char* name, void* address, size_t size); | 84 ResultCode TransferVariable(const char* name, void* address, size_t size); |
85 | 85 |
86 private: | 86 private: |
87 // Details of the target process. | 87 // Details of the target process. |
88 base::win::ScopedProcessInformation sandbox_process_info_; | 88 base::win::ScopedProcessInformation sandbox_process_info_; |
89 // The token associated with the process. It provides the core of the | 89 // The token associated with the process. It provides the core of the |
90 // sbox security. | 90 // sbox security. |
91 base::win::ScopedHandle lockdown_token_; | 91 base::win::ScopedHandle lockdown_token_; |
92 // The token given to the initial thread so that the target process can | 92 // The token given to the initial thread so that the target process can |
93 // start. It has more powers than the lockdown_token. | 93 // start. It has more powers than the lockdown_token. |
94 base::win::ScopedHandle initial_token_; | 94 base::win::ScopedHandle initial_token_; |
(...skipping 18 matching lines...) Expand all Loading... |
113 }; | 113 }; |
114 | 114 |
115 // Creates a mock TargetProcess used for testing interceptions. | 115 // Creates a mock TargetProcess used for testing interceptions. |
116 // TODO(cpu): It seems that this method is not going to be used anymore. | 116 // TODO(cpu): It seems that this method is not going to be used anymore. |
117 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); | 117 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); |
118 | 118 |
119 | 119 |
120 } // namespace sandbox | 120 } // namespace sandbox |
121 | 121 |
122 #endif // SANDBOX_SRC_TARGET_PROCESS_H__ | 122 #endif // SANDBOX_SRC_TARGET_PROCESS_H__ |
OLD | NEW |