Chromium Code Reviews| 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 // set_lockdown_token_after_create: When set, takes alternate path of | |
|
rvargas (doing something else)
2015/02/28 01:10:07
nit: use running prose to describe args: when |var
Shrikant Kelkar
2015/02/28 01:55:42
Done.
| |
| 49 // creating process with default token first followed by setting of thread | |
| 50 // token and process token. This approach is required for new LowBox token. | |
| 48 DWORD Create(const wchar_t* exe_path, | 51 DWORD Create(const wchar_t* exe_path, |
| 49 const wchar_t* command_line, | 52 const wchar_t* command_line, |
| 50 bool inherit_handles, | 53 bool inherit_handles, |
| 54 bool set_lockdown_token_after_create, | |
| 51 const base::win::StartupInformation& startup_info, | 55 const base::win::StartupInformation& startup_info, |
| 52 base::win::ScopedProcessInformation* target_info); | 56 base::win::ScopedProcessInformation* target_info); |
| 53 | 57 |
| 54 // Destroys the target process. | 58 // Destroys the target process. |
| 55 void Terminate(); | 59 void Terminate(); |
| 56 | 60 |
| 57 // Creates the IPC objects such as the BrokerDispatcher and the | 61 // Creates the IPC objects such as the BrokerDispatcher and the |
| 58 // 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. |
| 59 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, | 63 DWORD Init(Dispatcher* ipc_dispatcher, void* policy, |
| 60 uint32 shared_IPC_size, uint32 shared_policy_size); | 64 uint32 shared_IPC_size, uint32 shared_policy_size); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 }; | 127 }; |
| 124 | 128 |
| 125 // Creates a mock TargetProcess used for testing interceptions. | 129 // Creates a mock TargetProcess used for testing interceptions. |
| 126 // TODO(cpu): It seems that this method is not going to be used anymore. | 130 // TODO(cpu): It seems that this method is not going to be used anymore. |
| 127 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); | 131 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); |
| 128 | 132 |
| 129 | 133 |
| 130 } // namespace sandbox | 134 } // namespace sandbox |
| 131 | 135 |
| 132 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 136 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| OLD | NEW |