OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 // Need to include this before most other files because it defines | 7 // Need to include this before most other files because it defines |
8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define | 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define |
9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the | 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the |
10 // ViewMsgLog et al. functions. | 10 // ViewMsgLog et al. functions. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 | 232 |
233 #endif | 233 #endif |
234 | 234 |
235 void InitChromeLogging(const CommandLine& command_line, | 235 void InitChromeLogging(const CommandLine& command_line, |
236 OldFileDeletionState delete_old_log_file) { | 236 OldFileDeletionState delete_old_log_file) { |
237 DCHECK(!chrome_logging_initialized_) << | 237 DCHECK(!chrome_logging_initialized_) << |
238 "Attempted to initialize logging when it was already initialized."; | 238 "Attempted to initialize logging when it was already initialized."; |
239 | 239 |
240 #if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED) | 240 #if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED) |
241 IPC::Logging::SetLoggerFunctions(g_log_function_mapping); | 241 IPC::Logging::set_log_function_map(&g_log_function_mapping); |
242 #endif | 242 #endif |
243 | 243 |
244 FilePath log_path = GetLogFileName(); | 244 FilePath log_path = GetLogFileName(); |
245 | 245 |
246 #if defined(OS_CHROMEOS) | 246 #if defined(OS_CHROMEOS) |
247 // For BWSI (Incognito) logins, we want to put the logs in the user | 247 // For BWSI (Incognito) logins, we want to put the logs in the user |
248 // profile directory that is created for the temporary session instead | 248 // profile directory that is created for the temporary session instead |
249 // of in the system log directory, for privacy reasons. | 249 // of in the system log directory, for privacy reasons. |
250 if (command_line.HasSwitch(switches::kGuestSession)) | 250 if (command_line.HasSwitch(switches::kGuestSession)) |
251 log_path = GetSessionLogFile(command_line); | 251 log_path = GetSessionLogFile(command_line); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 assertions->push_back(wide_line); | 384 assertions->push_back(wide_line); |
385 ++assertion_count; | 385 ++assertion_count; |
386 } | 386 } |
387 } | 387 } |
388 log_file.close(); | 388 log_file.close(); |
389 | 389 |
390 return assertion_count; | 390 return assertion_count; |
391 } | 391 } |
392 | 392 |
393 } // namespace logging | 393 } // namespace logging |
OLD | NEW |