| OLD | NEW |
| 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 "ipc/ipc_logging.h" | 5 #include "ipc/ipc_logging.h" |
| 6 | 6 |
| 7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
| 8 #ifdef IPC_MESSAGE_LOG_ENABLED | 8 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 9 // This will cause render_messages.h etc to define ViewMsgLog and friends. | 9 // This will cause render_messages.h etc to define ViewMsgLog and friends. |
| 10 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 10 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 #ifdef IPC_MESSAGE_LOG_ENABLED | 31 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 32 | 32 |
| 33 using base::Time; | 33 using base::Time; |
| 34 | 34 |
| 35 // IPC::Logging is allocated as a singleton, so we don't need any kind of | 35 // IPC::Logging is allocated as a singleton, so we don't need any kind of |
| 36 // special retention program. | 36 // special retention program. |
| 37 template <> | 37 template <> |
| 38 struct RunnableMethodTraits<IPC::Logging> { | 38 struct RunnableMethodTraits<IPC::Logging> { |
| 39 void RetainCallee(IPC::Logging*) {} | 39 static void RetainCallee(IPC::Logging*) {} |
| 40 void ReleaseCallee(IPC::Logging*) {} | 40 static void ReleaseCallee(IPC::Logging*) {} |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 namespace IPC { | 43 namespace IPC { |
| 44 | 44 |
| 45 const wchar_t kLoggingEventName[] = L"ChromeIPCLog.%d"; | 45 const wchar_t kLoggingEventName[] = L"ChromeIPCLog.%d"; |
| 46 const int kLogSendDelayMs = 100; | 46 const int kLogSendDelayMs = 100; |
| 47 | 47 |
| 48 // We use a pointer to the function table to avoid any linker dependencies on | 48 // We use a pointer to the function table to avoid any linker dependencies on |
| 49 // all the traits used as IPC message parameters. | 49 // all the traits used as IPC message parameters. |
| 50 Logging::LogFunction *Logging::log_function_mapping_; | 50 Logging::LogFunction *Logging::log_function_mapping_; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 data->receive = message.received_time(); | 306 data->receive = message.received_time(); |
| 307 data->dispatch = Time::Now().ToInternalValue(); | 307 data->dispatch = Time::Now().ToInternalValue(); |
| 308 data->params = params; | 308 data->params = params; |
| 309 data->message_name = message_name; | 309 data->message_name = message_name; |
| 310 } | 310 } |
| 311 } | 311 } |
| 312 | 312 |
| 313 } | 313 } |
| 314 | 314 |
| 315 #endif // IPC_MESSAGE_LOG_ENABLED | 315 #endif // IPC_MESSAGE_LOG_ENABLED |
| OLD | NEW |