| Index: headless/app/headless_shell.cc
|
| diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
|
| index 244d3381d508716c82746ff1659bc7684c27f349..244e36d27a726be8bf35f4ef4ff703f07c40938c 100644
|
| --- a/headless/app/headless_shell.cc
|
| +++ b/headless/app/headless_shell.cc
|
| @@ -32,6 +32,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
|
|
|
| @@ -547,6 +549,15 @@ bool ValidateCommandLine(const base::CommandLine& command_line) {
|
| int HeadlessShellMain(HINSTANCE instance,
|
| sandbox::SandboxInterfaceInfo* sandbox_info) {
|
| base::CommandLine::Init(0, nullptr);
|
| +#if defined(HEADLESS_USE_CRASPHAD)
|
| + 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);
|
| + }
|
| +#endif // defined(HEADLESS_USE_CRASPHAD)
|
| RunChildProcessIfNeeded(instance, sandbox_info);
|
| HeadlessBrowser::Options::Builder builder(0, nullptr);
|
| builder.SetInstance(instance);
|
|
|