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

Unified Diff: content/common/sandbox_win.cc

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Fix Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 3963c6e33d9f211c96d5a76046f72d077398b38b..c76fc0e568c6c0ad10f97942e6ea14f8f1739e1d 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -720,7 +720,7 @@ bool InitTargetServices(sandbox::TargetServices* target_services) {
sandbox::ResultCode StartSandboxedProcess(
SandboxedProcessLauncherDelegate* delegate,
base::CommandLine* cmd_line,
- const base::HandlesToInheritVector& handles_to_inherit,
+ const std::vector<HANDLE>& handles_to_inherit,
base::Process* process) {
DCHECK(delegate);
const base::CommandLine& browser_command_line =
@@ -741,12 +741,7 @@ sandbox::ResultCode StartSandboxedProcess(
browser_command_line.HasSwitch(switches::kNoSandbox) ||
cmd_line->HasSwitch(switches::kNoSandbox)) {
base::LaunchOptions options;
-
- base::HandlesToInheritVector handles = handles_to_inherit;
- if (!handles_to_inherit.empty()) {
- options.inherit_handles = true;
- options.handles_to_inherit = &handles;
- }
+ options.handles_to_inherit = handles_to_inherit;
base::Process unsandboxed_process = base::LaunchProcess(*cmd_line, options);
*process = std::move(unsandboxed_process);

Powered by Google App Engine
This is Rietveld 408576698