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

Unified Diff: headless/lib/headless_content_main_delegate.cc

Issue 2690163005: Change platform methods and try to make init logging logic clearer (Closed)
Patch Set: Uploaded upstream 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/browser/headless_web_contents_impl.cc ('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 fc8f645164aacac9e20166366681351c0b52b680..1aa61b45fe926021101df0b3654daaf921c7237c 100644
--- a/headless/lib/headless_content_main_delegate.cc
+++ b/headless/lib/headless_content_main_delegate.cc
@@ -160,9 +160,14 @@ void HeadlessContentMainDelegate::InitCrashReporter(
void HeadlessContentMainDelegate::PreSandboxStartup() {
const base::CommandLine& command_line(
*base::CommandLine::ForCurrentProcess());
- const std::string process_type =
- command_line.GetSwitchValueASCII(switches::kProcessType);
+#if defined(OS_WIN)
+ // Windows always needs to initialize logging, otherwise you get a renderer
+ // crash.
InitLogging(command_line);
+#else
+ if (command_line.HasSwitch(switches::kEnableLogging))
+ InitLogging(command_line);
+#endif
InitCrashReporter(command_line);
InitializeResourceBundle();
}
« no previous file with comments | « headless/lib/browser/headless_web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698