| Index: headless/lib/browser/headless_browser_impl.cc
|
| diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc
|
| index 747639ca3f68c116562f531cef63a57c8e19a0b6..c45408f9e38013ca3c1602cb97439a2633178ea7 100644
|
| --- a/headless/lib/browser/headless_browser_impl.cc
|
| +++ b/headless/lib/browser/headless_browser_impl.cc
|
| @@ -27,11 +27,6 @@
|
| #include "ui/events/devices/device_data_manager.h"
|
| #include "ui/gfx/geometry/size.h"
|
|
|
| -#if defined(OS_WIN)
|
| -#include "content/public/app/sandbox_helper_win.h"
|
| -#include "sandbox/win/src/sandbox_types.h"
|
| -#endif
|
| -
|
| namespace headless {
|
| namespace {
|
|
|
| @@ -40,9 +35,10 @@
|
| const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback) {
|
| content::ContentMainParams params(nullptr);
|
| #if defined(OS_WIN)
|
| - sandbox::SandboxInterfaceInfo sandbox_info = {0};
|
| - content::InitializeSandboxInfo(&sandbox_info);
|
| - params.sandbox_info = &sandbox_info;
|
| + // Sandbox info has to be set and initialized.
|
| + CHECK(options.sandbox_info);
|
| + params.instance = options.instance;
|
| + params.sandbox_info = std::move(options.sandbox_info);
|
| #elif !defined(OS_ANDROID)
|
| params.argc = options.argc;
|
| params.argv = options.argv;
|
| @@ -200,6 +196,7 @@
|
| return find_it->second.get();
|
| }
|
|
|
| +#if !defined(OS_WIN)
|
| void RunChildProcessIfNeeded(int argc, const char** argv) {
|
| base::CommandLine::Init(argc, argv);
|
| const base::CommandLine& command_line(
|
| @@ -218,6 +215,7 @@
|
| exit(RunContentMain(builder.Build(),
|
| base::Callback<void(HeadlessBrowser*)>()));
|
| }
|
| +#endif // !defined(OS_WIN)
|
|
|
| int HeadlessBrowserMain(
|
| HeadlessBrowser::Options options,
|
|
|