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 #ifdef IPC_MESSAGE_LOG_ENABLED | 7 #ifdef IPC_MESSAGE_LOG_ENABLED |
8 // This will cause render_messages.h etc to define ViewMsgLog and friends. | 8 // This will cause render_messages.h etc to define ViewMsgLog and friends. |
9 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 9 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
10 #endif | 10 #endif |
(...skipping 16 matching lines...) Expand all Loading... |
27 #endif | 27 #endif |
28 | 28 |
29 #ifdef IPC_MESSAGE_LOG_ENABLED | 29 #ifdef IPC_MESSAGE_LOG_ENABLED |
30 | 30 |
31 using base::Time; | 31 using base::Time; |
32 | 32 |
33 // IPC::Logging is allocated as a singleton, so we don't need any kind of | 33 // IPC::Logging is allocated as a singleton, so we don't need any kind of |
34 // special retention program. | 34 // special retention program. |
35 template <> | 35 template <> |
36 struct RunnableMethodTraits<IPC::Logging> { | 36 struct RunnableMethodTraits<IPC::Logging> { |
37 static void RetainCallee(IPC::Logging*) {} | 37 void RetainCallee(IPC::Logging*) {} |
38 static void ReleaseCallee(IPC::Logging*) {} | 38 void ReleaseCallee(IPC::Logging*) {} |
39 }; | 39 }; |
40 | 40 |
41 namespace IPC { | 41 namespace IPC { |
42 | 42 |
43 const int kLogSendDelayMs = 100; | 43 const int kLogSendDelayMs = 100; |
44 | 44 |
45 // We use a pointer to the function table to avoid any linker dependencies on | 45 // We use a pointer to the function table to avoid any linker dependencies on |
46 // all the traits used as IPC message parameters. | 46 // all the traits used as IPC message parameters. |
47 Logging::LogFunction *Logging::log_function_mapping_; | 47 Logging::LogFunction *Logging::log_function_mapping_; |
48 | 48 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 data->receive = message.received_time(); | 238 data->receive = message.received_time(); |
239 data->dispatch = Time::Now().ToInternalValue(); | 239 data->dispatch = Time::Now().ToInternalValue(); |
240 data->params = params; | 240 data->params = params; |
241 data->message_name = message_name; | 241 data->message_name = message_name; |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 } | 245 } |
246 | 246 |
247 #endif // IPC_MESSAGE_LOG_ENABLED | 247 #endif // IPC_MESSAGE_LOG_ENABLED |
OLD | NEW |