| OLD | NEW |
| 1 // Copyright (c) 2012 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 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" |
| 11 #include "sandbox/src/crosscall_server.h" | 11 #include "sandbox/src/crosscall_server.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 // TODO(cpu): Currently there does not seem to be a reason to implement | 28 // TODO(cpu): Currently there does not seem to be a reason to implement |
| 29 // reference counting for this class since is internal, but kept the | 29 // reference counting for this class since is internal, but kept the |
| 30 // the same interface so the interception framework does not need to be | 30 // the same interface so the interception framework does not need to be |
| 31 // touched at this point. | 31 // touched at this point. |
| 32 void AddRef() {} | 32 void AddRef() {} |
| 33 void Release() {} | 33 void Release() {} |
| 34 | 34 |
| 35 // Creates the new target process. The process is created suspended. | 35 // Creates the new target process. The process is created suspended. |
| 36 DWORD Create(const wchar_t* exe_path, const wchar_t* command_line, | 36 DWORD Create(const wchar_t* exe_path, const wchar_t* command_line, |
| 37 const wchar_t* desktop, | 37 const wchar_t* desktop, PROCESS_INFORMATION* target_info); |
| 38 PSECURITY_ATTRIBUTES security_attributes, | |
| 39 PROCESS_INFORMATION* target_info); | |
| 40 | 38 |
| 41 // Destroys the target process. | 39 // Destroys the target process. |
| 42 void Terminate(); | 40 void Terminate(); |
| 43 | 41 |
| 44 // Creates the IPC objects such as the BrokerDispatcher and the | 42 // Creates the IPC objects such as the BrokerDispatcher and the |
| 45 // IPC server. The IPC server uses the services of the thread_pool. | 43 // IPC server. The IPC server uses the services of the thread_pool. |
| 46 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, | 44 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, |
| 47 size_t shared_IPC_size, size_t shared_policy_size); | 45 size_t shared_IPC_size, size_t shared_policy_size); |
| 48 | 46 |
| 49 // Returns the handle to the target process. | 47 // Returns the handle to the target process. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 }; | 112 }; |
| 115 | 113 |
| 116 // Creates a mock TargetProcess used for testing interceptions. | 114 // Creates a mock TargetProcess used for testing interceptions. |
| 117 // TODO(cpu): It seems that this method is not going to be used anymore. | 115 // TODO(cpu): It seems that this method is not going to be used anymore. |
| 118 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); | 116 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); |
| 119 | 117 |
| 120 | 118 |
| 121 } // namespace sandbox | 119 } // namespace sandbox |
| 122 | 120 |
| 123 #endif // SANDBOX_SRC_TARGET_PROCESS_H__ | 121 #endif // SANDBOX_SRC_TARGET_PROCESS_H__ |
| OLD | NEW |