OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include <memory> | 5 #include <memory> |
6 #include <sstream> | 6 #include <sstream> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 #if defined(OS_WIN) | 542 #if defined(OS_WIN) |
543 int HeadlessShellMain(HINSTANCE instance, | 543 int HeadlessShellMain(HINSTANCE instance, |
544 sandbox::SandboxInterfaceInfo* sandbox_info) { | 544 sandbox::SandboxInterfaceInfo* sandbox_info) { |
545 base::CommandLine::Init(0, nullptr); | 545 base::CommandLine::Init(0, nullptr); |
546 #if defined(HEADLESS_USE_CRASPHAD) | 546 #if defined(HEADLESS_USE_CRASPHAD) |
547 std::string process_type = | 547 std::string process_type = |
548 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 548 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
549 ::switches::kProcessType); | 549 ::switches::kProcessType); |
550 if (process_type == crash_reporter::switches::kCrashpadHandler) { | 550 if (process_type == crash_reporter::switches::kCrashpadHandler) { |
551 return crash_reporter::RunAsCrashpadHandler( | 551 return crash_reporter::RunAsCrashpadHandler( |
552 *base::CommandLine::ForCurrentProcess(), ::switches::kProcessType); | 552 *base::CommandLine::ForCurrentProcess(), base::FilePath(), |
| 553 ::switches::kProcessType, switches::kUserDataDir); |
553 } | 554 } |
554 #endif // defined(HEADLESS_USE_CRASPHAD) | 555 #endif // defined(HEADLESS_USE_CRASPHAD) |
555 RunChildProcessIfNeeded(instance, sandbox_info); | 556 RunChildProcessIfNeeded(instance, sandbox_info); |
556 HeadlessBrowser::Options::Builder builder(0, nullptr); | 557 HeadlessBrowser::Options::Builder builder(0, nullptr); |
557 builder.SetInstance(instance); | 558 builder.SetInstance(instance); |
558 builder.SetSandboxInfo(std::move(sandbox_info)); | 559 builder.SetSandboxInfo(std::move(sandbox_info)); |
559 #else | 560 #else |
560 int HeadlessShellMain(int argc, const char** argv) { | 561 int HeadlessShellMain(int argc, const char** argv) { |
561 base::CommandLine::Init(argc, argv); | 562 base::CommandLine::Init(argc, argv); |
562 RunChildProcessIfNeeded(argc, argv); | 563 RunChildProcessIfNeeded(argc, argv); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 | 675 |
675 int HeadlessShellMain(const content::ContentMainParams& params) { | 676 int HeadlessShellMain(const content::ContentMainParams& params) { |
676 #if defined(OS_WIN) | 677 #if defined(OS_WIN) |
677 return HeadlessShellMain(params.instance, params.sandbox_info); | 678 return HeadlessShellMain(params.instance, params.sandbox_info); |
678 #else | 679 #else |
679 return HeadlessShellMain(params.argc, params.argv); | 680 return HeadlessShellMain(params.argc, params.argv); |
680 #endif | 681 #endif |
681 } | 682 } |
682 | 683 |
683 } // namespace headless | 684 } // namespace headless |
OLD | NEW |