| Index: headless/app/headless_shell.cc
|
| diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
|
| index dfab4bac8c94401b936c55568e3e0d2a04524795..bd0638d7a58ec6d2941b8c4abacf0350a2ab637e 100644
|
| --- a/headless/app/headless_shell.cc
|
| +++ b/headless/app/headless_shell.cc
|
| @@ -30,6 +30,8 @@
|
| #include "ui/gfx/geometry/size.h"
|
|
|
| #if defined(OS_WIN)
|
| +#include "components/crash/content/app/crash_switches.h"
|
| +#include "components/crash/content/app/run_as_crashpad_handler_win.h"
|
| #include "sandbox/win/src/sandbox_types.h"
|
| #endif
|
|
|
| @@ -505,6 +507,15 @@ bool ValidateCommandLine(const base::CommandLine& command_line) {
|
| #if defined(OS_WIN)
|
| int HeadlessShellMain(HINSTANCE instance,
|
| sandbox::SandboxInterfaceInfo* sandbox_info) {
|
| + base::CommandLine::Init(0, nullptr);
|
| + std::string process_type =
|
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + ::switches::kProcessType);
|
| + if (process_type == crash_reporter::switches::kCrashpadHandler) {
|
| + return crash_reporter::RunAsCrashpadHandler(
|
| + *base::CommandLine::ForCurrentProcess(), ::switches::kProcessType);
|
| + }
|
| +
|
| RunChildProcessIfNeeded(instance, sandbox_info);
|
| HeadlessBrowser::Options::Builder builder(0, nullptr);
|
| builder.SetInstance(instance);
|
|
|