OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) |
8 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 8 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
9 #endif | 9 #endif |
10 | 10 |
11 #include <stddef.h> | 11 #include <stddef.h> |
12 #include <stdint.h> | 12 #include <stdint.h> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/bind_helpers.h" | 15 #include "base/bind_helpers.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/location.h" | 17 #include "base/location.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/threading/thread.h" | 21 #include "base/threading/thread.h" |
22 #include "base/threading/thread_task_runner_handle.h" | 22 #include "base/threading/thread_task_runner_handle.h" |
23 #include "base/threading/thread_task_runner_handle.h" | 23 #include "base/threading/thread_task_runner_handle.h" |
24 #include "base/time/time.h" | 24 #include "base/time/time.h" |
25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
26 #include "ipc/ipc_message_utils.h" | 26 #include "ipc/ipc_message_utils.h" |
27 #include "ipc/ipc_sender.h" | 27 #include "ipc/ipc_sender.h" |
28 #include "ipc/ipc_sync_message.h" | 28 #include "ipc/ipc_sync_message.h" |
29 | 29 |
30 #if defined(OS_POSIX) | 30 #if defined(OS_POSIX) |
31 #include <unistd.h> | 31 #include <unistd.h> |
32 #endif | 32 #endif |
33 | 33 |
34 #ifdef IPC_MESSAGE_LOG_ENABLED | 34 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) |
35 | 35 |
36 using base::Time; | 36 using base::Time; |
37 | 37 |
38 namespace IPC { | 38 namespace IPC { |
39 | 39 |
40 const int kLogSendDelayMs = 100; | 40 const int kLogSendDelayMs = 100; |
41 | 41 |
42 // We use a pointer to the function table to avoid any linker dependencies on | 42 // We use a pointer to the function table to avoid any linker dependencies on |
43 // all the traits used as IPC message parameters. | 43 // all the traits used as IPC message parameters. |
44 LogFunctionMap* Logging::log_function_map_; | 44 LogFunctionMap* Logging::log_function_map_; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 data->sent = message.sent_time(); | 303 data->sent = message.sent_time(); |
304 data->receive = message.received_time(); | 304 data->receive = message.received_time(); |
305 data->dispatch = Time::Now().ToInternalValue(); | 305 data->dispatch = Time::Now().ToInternalValue(); |
306 data->params = params; | 306 data->params = params; |
307 data->message_name = message_name; | 307 data->message_name = message_name; |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 } | 311 } |
312 | 312 |
313 #endif // IPC_MESSAGE_LOG_ENABLED | 313 #endif // BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) |
OLD | NEW |