| Index: chrome/app/chrome_main_delegate.cc
|
| diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
|
| index 465bf29e599edbe4ef115628e92a9210362c28c8..3d66db15a336f9e1476b34fc2401f554b49b1fa0 100644
|
| --- a/chrome/app/chrome_main_delegate.cc
|
| +++ b/chrome/app/chrome_main_delegate.cc
|
| @@ -388,6 +388,17 @@ void InitializeUserDataDir() {
|
| command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
|
| }
|
|
|
| +void InitLogging(const std::string& process_type) {
|
| + logging::OldFileDeletionState file_state =
|
| + logging::APPEND_TO_OLD_LOG_FILE;
|
| + if (process_type.empty()) {
|
| + file_state = logging::DELETE_OLD_LOG_FILE;
|
| + }
|
| + const base::CommandLine& command_line =
|
| + *base::CommandLine::ForCurrentProcess();
|
| + logging::InitChromeLogging(command_line, file_state);
|
| +}
|
| +
|
| } // namespace
|
|
|
| ChromeMainDelegate::ChromeMainDelegate() {
|
| @@ -662,14 +673,10 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
| if (command_line.HasSwitch(switches::kMessageLoopHistogrammer))
|
| base::MessageLoop::EnableHistogrammer(true);
|
|
|
| -#if !defined(OS_ANDROID)
|
| +#if !defined(OS_ANDROID) && !defined(OS_WIN)
|
| // Android does InitLogging when library is loaded. Skip here.
|
| - logging::OldFileDeletionState file_state =
|
| - logging::APPEND_TO_OLD_LOG_FILE;
|
| - if (process_type.empty()) {
|
| - file_state = logging::DELETE_OLD_LOG_FILE;
|
| - }
|
| - logging::InitChromeLogging(command_line, file_state);
|
| + // For windows we call InitLogging when the sandbox is initialized.
|
| + InitLogging(process_type);
|
| #endif
|
|
|
| #if defined(OS_WIN)
|
| @@ -780,6 +787,7 @@ void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) {
|
| AdjustLinuxOOMScore(process_type);
|
| #endif
|
| #if defined(OS_WIN)
|
| + InitLogging(process_type);
|
| SuppressWindowsErrorDialogs();
|
| #endif
|
|
|
|
|