| 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_WIN_SRC_TARGET_PROCESS_H_ | 5 #ifndef SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| 6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <stddef.h> | |
| 10 #include <stdint.h> | |
| 11 | 9 |
| 12 #include "base/macros.h" | 10 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/win/scoped_handle.h" | 12 #include "base/win/scoped_handle.h" |
| 15 #include "base/win/scoped_process_information.h" | 13 #include "base/win/scoped_process_information.h" |
| 16 #include "sandbox/win/src/crosscall_server.h" | 14 #include "sandbox/win/src/crosscall_server.h" |
| 17 #include "sandbox/win/src/sandbox_types.h" | 15 #include "sandbox/win/src/sandbox_types.h" |
| 18 | 16 |
| 19 namespace base { | 17 namespace base { |
| 20 namespace win { | 18 namespace win { |
| 21 | 19 |
| 22 class StartupInformation; | 20 class StartupInformation; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 const wchar_t* command_line, | 53 const wchar_t* command_line, |
| 56 bool inherit_handles, | 54 bool inherit_handles, |
| 57 const base::win::StartupInformation& startup_info, | 55 const base::win::StartupInformation& startup_info, |
| 58 base::win::ScopedProcessInformation* target_info); | 56 base::win::ScopedProcessInformation* target_info); |
| 59 | 57 |
| 60 // Destroys the target process. | 58 // Destroys the target process. |
| 61 void Terminate(); | 59 void Terminate(); |
| 62 | 60 |
| 63 // Creates the IPC objects such as the BrokerDispatcher and the | 61 // Creates the IPC objects such as the BrokerDispatcher and the |
| 64 // IPC server. The IPC server uses the services of the thread_pool. | 62 // IPC server. The IPC server uses the services of the thread_pool. |
| 65 DWORD Init(Dispatcher* ipc_dispatcher, | 63 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, |
| 66 void* policy, | 64 uint32 shared_IPC_size, uint32 shared_policy_size); |
| 67 uint32_t shared_IPC_size, | |
| 68 uint32_t shared_policy_size); | |
| 69 | 65 |
| 70 // Returns the handle to the target process. | 66 // Returns the handle to the target process. |
| 71 HANDLE Process() const { | 67 HANDLE Process() const { |
| 72 return sandbox_process_info_.process_handle(); | 68 return sandbox_process_info_.process_handle(); |
| 73 } | 69 } |
| 74 | 70 |
| 75 // Returns the handle to the job object that the target process belongs to. | 71 // Returns the handle to the job object that the target process belongs to. |
| 76 HANDLE Job() const { | 72 HANDLE Job() const { |
| 77 return job_; | 73 return job_; |
| 78 } | 74 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 }; | 130 }; |
| 135 | 131 |
| 136 // Creates a mock TargetProcess used for testing interceptions. | 132 // Creates a mock TargetProcess used for testing interceptions. |
| 137 // TODO(cpu): It seems that this method is not going to be used anymore. | 133 // TODO(cpu): It seems that this method is not going to be used anymore. |
| 138 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); | 134 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); |
| 139 | 135 |
| 140 | 136 |
| 141 } // namespace sandbox | 137 } // namespace sandbox |
| 142 | 138 |
| 143 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 139 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| OLD | NEW |