| 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 ~TargetProcess(); | 38 ~TargetProcess(); |
| 39 | 39 |
| 40 // TODO(cpu): Currently there does not seem to be a reason to implement | 40 // TODO(cpu): Currently there does not seem to be a reason to implement |
| 41 // reference counting for this class since is internal, but kept the | 41 // reference counting for this class since is internal, but kept the |
| 42 // the same interface so the interception framework does not need to be | 42 // the same interface so the interception framework does not need to be |
| 43 // touched at this point. | 43 // touched at this point. |
| 44 void AddRef() {} | 44 void AddRef() {} |
| 45 void Release() {} | 45 void Release() {} |
| 46 | 46 |
| 47 // Creates the new target process. The process is created suspended. | 47 // Creates the new target process. The process is created suspended. |
| 48 // When |set_lockdown_token_after_create| is set, the lockdown token |
| 49 // is replaced after the process is created |
| 48 DWORD Create(const wchar_t* exe_path, | 50 DWORD Create(const wchar_t* exe_path, |
| 49 const wchar_t* command_line, | 51 const wchar_t* command_line, |
| 50 bool inherit_handles, | 52 bool inherit_handles, |
| 53 bool set_lockdown_token_after_create, |
| 51 const base::win::StartupInformation& startup_info, | 54 const base::win::StartupInformation& startup_info, |
| 52 base::win::ScopedProcessInformation* target_info); | 55 base::win::ScopedProcessInformation* target_info); |
| 53 | 56 |
| 54 // Destroys the target process. | 57 // Destroys the target process. |
| 55 void Terminate(); | 58 void Terminate(); |
| 56 | 59 |
| 57 // Creates the IPC objects such as the BrokerDispatcher and the | 60 // Creates the IPC objects such as the BrokerDispatcher and the |
| 58 // IPC server. The IPC server uses the services of the thread_pool. | 61 // IPC server. The IPC server uses the services of the thread_pool. |
| 59 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, | 62 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, |
| 60 uint32 shared_IPC_size, uint32 shared_policy_size); | 63 uint32 shared_IPC_size, uint32 shared_policy_size); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 // Creates a mock TargetProcess used for testing interceptions. | 128 // Creates a mock TargetProcess used for testing interceptions. |
| 126 // TODO(cpu): It seems that this method is not going to be used anymore. | 129 // TODO(cpu): It seems that this method is not going to be used anymore. |
| 127 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); | 130 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); |
| 128 | 131 |
| 129 | 132 |
| 130 } // namespace sandbox | 133 } // namespace sandbox |
| 131 | 134 |
| 132 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 135 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| OLD | NEW |