Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: headless/app/headless_shell.cc

Issue 2867063002: Stability instrumentation Crashpad integration (Closed)
Patch Set: clang compile Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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);
grt (UTC plus 2) 2017/05/24 06:58:49 uber-nit: "::switches::kUserDataDir" for consisten
manzagop (departed) 2017/05/24 13:19:53 Actually, that second one is in the headless names
grt (UTC plus 2) 2017/05/24 13:35:02 Ha. Hrm. I'd be inclined to remove :: from the fir
alex clarke (OOO till 29th) 2017/05/24 13:45:06 I don't know why this code is using :: If it compi
manzagop (departed) 2017/05/24 15:40:29 Hm, I think the author's intent was to highlight t
alex clarke (OOO till 29th) 2017/05/24 16:30:48 Ah yes you're probably right. Lets leave it as is
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698