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

Unified Diff: headless/lib/headless_content_main_delegate.cc

Issue 2712093002: Enable building headless_shell in MAC. This is an initial implementation with a hidden window, rath… (Closed)
Patch Set: revet chrome/BUILD.gn Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/lib/headless_content_main_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/headless_content_main_delegate.cc
diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
index 1aa61b45fe926021101df0b3654daaf921c7237c..72df5a29a65a3adaa86b5a24e36bdc028f8dce92 100644
--- a/headless/lib/headless_content_main_delegate.cc
+++ b/headless/lib/headless_content_main_delegate.cc
@@ -147,6 +147,7 @@ void HeadlessContentMainDelegate::InitCrashReporter(
g_headless_crash_client.Pointer()->set_crash_dumps_dir(
browser_->options()->crash_dumps_dir);
+#if !defined(OS_MACOSX)
if (!browser_->options()->enable_crash_reporter) {
DCHECK(!breakpad::IsCrashReporterEnabled());
return;
@@ -155,6 +156,7 @@ void HeadlessContentMainDelegate::InitCrashReporter(
if (process_type != switches::kZygoteProcess)
breakpad::InitCrashReporter(process_type);
#endif // defined(HEADLESS_USE_BREAKPAD)
+#endif // !defined(OS_MACOSX)
}
void HeadlessContentMainDelegate::PreSandboxStartup() {
@@ -168,7 +170,9 @@ void HeadlessContentMainDelegate::PreSandboxStartup() {
if (command_line.HasSwitch(switches::kEnableLogging))
InitLogging(command_line);
#endif
+#if !defined(OS_MACOSX)
InitCrashReporter(command_line);
+#endif
InitializeResourceBundle();
}
@@ -198,6 +202,7 @@ int HeadlessContentMainDelegate::RunProcess(
return 0;
}
+#if !defined(OS_MACOSX) && defined(OS_POSIX) && !defined(OS_ANDROID)
void HeadlessContentMainDelegate::ZygoteForked() {
const base::CommandLine& command_line(
*base::CommandLine::ForCurrentProcess());
@@ -208,6 +213,7 @@ void HeadlessContentMainDelegate::ZygoteForked() {
// bail out gracefully if the browser process hasn't enabled crash reporting.
breakpad::InitCrashReporter(process_type);
}
+#endif
// static
HeadlessContentMainDelegate* HeadlessContentMainDelegate::GetInstance() {
« no previous file with comments | « headless/lib/headless_content_main_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698