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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 #if defined(OS_WIN) | 548 #if defined(OS_WIN) |
549 int HeadlessShellMain(HINSTANCE instance, | 549 int HeadlessShellMain(HINSTANCE instance, |
550 sandbox::SandboxInterfaceInfo* sandbox_info) { | 550 sandbox::SandboxInterfaceInfo* sandbox_info) { |
551 base::CommandLine::Init(0, nullptr); | 551 base::CommandLine::Init(0, nullptr); |
552 #if defined(HEADLESS_USE_CRASPHAD) | 552 #if defined(HEADLESS_USE_CRASPHAD) |
553 std::string process_type = | 553 std::string process_type = |
554 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 554 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
555 ::switches::kProcessType); | 555 ::switches::kProcessType); |
556 if (process_type == crash_reporter::switches::kCrashpadHandler) { | 556 if (process_type == crash_reporter::switches::kCrashpadHandler) { |
557 return crash_reporter::RunAsCrashpadHandler( | 557 return crash_reporter::RunAsCrashpadHandler( |
558 *base::CommandLine::ForCurrentProcess(), ::switches::kProcessType); | 558 *base::CommandLine::ForCurrentProcess(), base::FilePath(), |
| 559 ::switches::kProcessType, ::switches::kUserDataDir); |
559 } | 560 } |
560 #endif // defined(HEADLESS_USE_CRASPHAD) | 561 #endif // defined(HEADLESS_USE_CRASPHAD) |
561 RunChildProcessIfNeeded(instance, sandbox_info); | 562 RunChildProcessIfNeeded(instance, sandbox_info); |
562 HeadlessBrowser::Options::Builder builder(0, nullptr); | 563 HeadlessBrowser::Options::Builder builder(0, nullptr); |
563 builder.SetInstance(instance); | 564 builder.SetInstance(instance); |
564 builder.SetSandboxInfo(std::move(sandbox_info)); | 565 builder.SetSandboxInfo(std::move(sandbox_info)); |
565 #else | 566 #else |
566 int HeadlessShellMain(int argc, const char** argv) { | 567 int HeadlessShellMain(int argc, const char** argv) { |
567 base::CommandLine::Init(argc, argv); | 568 base::CommandLine::Init(argc, argv); |
568 RunChildProcessIfNeeded(argc, argv); | 569 RunChildProcessIfNeeded(argc, argv); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 679 |
679 int HeadlessShellMain(const content::ContentMainParams& params) { | 680 int HeadlessShellMain(const content::ContentMainParams& params) { |
680 #if defined(OS_WIN) | 681 #if defined(OS_WIN) |
681 return HeadlessShellMain(params.instance, params.sandbox_info); | 682 return HeadlessShellMain(params.instance, params.sandbox_info); |
682 #else | 683 #else |
683 return HeadlessShellMain(params.argc, params.argv); | 684 return HeadlessShellMain(params.argc, params.argv); |
684 #endif | 685 #endif |
685 } | 686 } |
686 | 687 |
687 } // namespace headless | 688 } // namespace headless |
OLD | NEW |