Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: sandbox/win/src/target_process.h

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/win/src/sandbox_types.h ('k') | sandbox/win/src/target_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ~TargetProcess(); 46 ~TargetProcess();
47 47
48 // TODO(cpu): Currently there does not seem to be a reason to implement 48 // TODO(cpu): Currently there does not seem to be a reason to implement
49 // reference counting for this class since is internal, but kept the 49 // reference counting for this class since is internal, but kept the
50 // the same interface so the interception framework does not need to be 50 // the same interface so the interception framework does not need to be
51 // touched at this point. 51 // touched at this point.
52 void AddRef() {} 52 void AddRef() {}
53 void Release() {} 53 void Release() {}
54 54
55 // Creates the new target process. The process is created suspended. 55 // Creates the new target process. The process is created suspended.
56 DWORD Create(const wchar_t* exe_path, 56 ResultCode Create(const wchar_t* exe_path,
57 const wchar_t* command_line, 57 const wchar_t* command_line,
58 bool inherit_handles, 58 bool inherit_handles,
59 const base::win::StartupInformation& startup_info, 59 const base::win::StartupInformation& startup_info,
60 base::win::ScopedProcessInformation* target_info); 60 base::win::ScopedProcessInformation* target_info,
61 DWORD* win_error);
61 62
62 // Destroys the target process. 63 // Destroys the target process.
63 void Terminate(); 64 void Terminate();
64 65
65 // Creates the IPC objects such as the BrokerDispatcher and the 66 // Creates the IPC objects such as the BrokerDispatcher and the
66 // IPC server. The IPC server uses the services of the thread_pool. 67 // IPC server. The IPC server uses the services of the thread_pool.
67 DWORD Init(Dispatcher* ipc_dispatcher, 68 ResultCode Init(Dispatcher* ipc_dispatcher,
68 void* policy, 69 void* policy,
69 uint32_t shared_IPC_size, 70 uint32_t shared_IPC_size,
70 uint32_t shared_policy_size); 71 uint32_t shared_policy_size,
72 DWORD* win_error);
71 73
72 // Returns the handle to the target process. 74 // Returns the handle to the target process.
73 HANDLE Process() const { 75 HANDLE Process() const {
74 return sandbox_process_info_.process_handle(); 76 return sandbox_process_info_.process_handle();
75 } 77 }
76 78
77 // Returns the handle to the job object that the target process belongs to. 79 // Returns the handle to the job object that the target process belongs to.
78 HANDLE Job() const { 80 HANDLE Job() const {
79 return job_; 81 return job_;
80 } 82 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 }; 138 };
137 139
138 // Creates a mock TargetProcess used for testing interceptions. 140 // Creates a mock TargetProcess used for testing interceptions.
139 // TODO(cpu): It seems that this method is not going to be used anymore. 141 // TODO(cpu): It seems that this method is not going to be used anymore.
140 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); 142 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address);
141 143
142 144
143 } // namespace sandbox 145 } // namespace sandbox
144 146
145 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ 147 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/sandbox_types.h ('k') | sandbox/win/src/target_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698