| 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 8526274a3c0bb10061e7d9eedf241a568cac7503..e5ae9ec9d7ccce0f23546d937269f1a61d6ef9ce 100644
|
| --- a/headless/lib/headless_content_main_delegate.cc
|
| +++ b/headless/lib/headless_content_main_delegate.cc
|
| @@ -98,10 +98,16 @@ bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) {
|
|
|
| void HeadlessContentMainDelegate::InitLogging(
|
| const base::CommandLine& command_line) {
|
| + const std::string process_type =
|
| + command_line.GetSwitchValueASCII(switches::kProcessType);
|
| #if !defined(OS_WIN)
|
| if (!command_line.HasSwitch(switches::kEnableLogging))
|
| return;
|
| -#endif
|
| +#else
|
| + // Child processes in Windows are not able to initialize logging.
|
| + if (!process_type.empty())
|
| + return;
|
| +#endif // !defined(OS_WIN)
|
|
|
| logging::LoggingDestination log_mode;
|
| base::FilePath log_filename(FILE_PATH_LITERAL("chrome_debug.log"));
|
| @@ -146,9 +152,6 @@ void HeadlessContentMainDelegate::InitLogging(
|
| log_path = base::FilePath::FromUTF8Unsafe(filename);
|
| }
|
|
|
| - const std::string process_type =
|
| - command_line.GetSwitchValueASCII(switches::kProcessType);
|
| -
|
| settings.logging_dest = log_mode;
|
| settings.log_file = log_path.value().c_str();
|
| settings.lock_log = logging::DONT_LOCK_LOG_FILE;
|
|
|