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

Side by Side Diff: chrome/common/logging_chrome.cc

Issue 155905: Separates ipc code from common (http://crbug.com/16829) (Closed)
Patch Set: Fixes reference to 'common_message_traits' it's actually 'common_param_traits' Created 11 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/common/ipc_tests.cc ('k') | chrome/common/message_router.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 dialogs_are_suppressed_ = true; 65 dialogs_are_suppressed_ = true;
66 } 66 }
67 67
68 namespace logging { 68 namespace logging {
69 69
70 void InitChromeLogging(const CommandLine& command_line, 70 void InitChromeLogging(const CommandLine& command_line,
71 OldFileDeletionState delete_old_log_file) { 71 OldFileDeletionState delete_old_log_file) {
72 DCHECK(!chrome_logging_initialized_) << 72 DCHECK(!chrome_logging_initialized_) <<
73 "Attempted to initialize logging when it was already initialized."; 73 "Attempted to initialize logging when it was already initialized.";
74 74
75 #if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED)
76 IPC::Logging::SetLoggerFunctions(g_log_function_mapping);
77 #endif
78
75 // only use OutputDebugString in debug mode 79 // only use OutputDebugString in debug mode
76 #ifdef NDEBUG 80 #ifdef NDEBUG
77 bool enable_logging = false; 81 bool enable_logging = false;
78 const wchar_t *kInvertLoggingSwitch = switches::kEnableLogging; 82 const wchar_t *kInvertLoggingSwitch = switches::kEnableLogging;
79 const logging::LoggingDestination kDefaultLoggingMode = 83 const logging::LoggingDestination kDefaultLoggingMode =
80 logging::LOG_ONLY_TO_FILE; 84 logging::LOG_ONLY_TO_FILE;
81 #else 85 #else
82 bool enable_logging = true; 86 bool enable_logging = true;
83 const wchar_t *kInvertLoggingSwitch = switches::kDisableLogging; 87 const wchar_t *kInvertLoggingSwitch = switches::kDisableLogging;
84 const logging::LoggingDestination kDefaultLoggingMode = 88 const logging::LoggingDestination kDefaultLoggingMode =
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 assertions->push_back(wide_line); 197 assertions->push_back(wide_line);
194 ++assertion_count; 198 ++assertion_count;
195 } 199 }
196 } 200 }
197 log_file.close(); 201 log_file.close();
198 202
199 return assertion_count; 203 return assertion_count;
200 } 204 }
201 205
202 } // namespace logging 206 } // namespace logging
OLDNEW
« no previous file with comments | « chrome/common/ipc_tests.cc ('k') | chrome/common/message_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698