| 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 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 8 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 8 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 return; | 123 return; |
| 124 | 124 |
| 125 if (message->is_reply()) { | 125 if (message->is_reply()) { |
| 126 LogData* data = message->sync_log_data(); | 126 LogData* data = message->sync_log_data(); |
| 127 if (!data) | 127 if (!data) |
| 128 return; | 128 return; |
| 129 | 129 |
| 130 // This is actually the delayed reply to a sync message. Create a string | 130 // This is actually the delayed reply to a sync message. Create a string |
| 131 // of the output parameters, add it to the LogData that was earlier stashed | 131 // of the output parameters, add it to the LogData that was earlier stashed |
| 132 // with the reply, and log the result. | 132 // with the reply, and log the result. |
| 133 GenerateLogData("", *message, data, true); |
| 133 data->channel = channel_id; | 134 data->channel = channel_id; |
| 134 GenerateLogData("", *message, data, true); | |
| 135 Log(*data); | 135 Log(*data); |
| 136 delete data; | 136 delete data; |
| 137 message->set_sync_log_data(NULL); | 137 message->set_sync_log_data(NULL); |
| 138 } else { | 138 } else { |
| 139 // If the time has already been set (i.e. by ChannelProxy), keep that time | 139 // If the time has already been set (i.e. by ChannelProxy), keep that time |
| 140 // instead as it's more accurate. | 140 // instead as it's more accurate. |
| 141 if (!message->sent_time()) | 141 if (!message->sent_time()) |
| 142 message->set_sent_time(Time::Now().ToInternalValue()); | 142 message->set_sent_time(Time::Now().ToInternalValue()); |
| 143 } | 143 } |
| 144 } | 144 } |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 data->receive = message.received_time(); | 305 data->receive = message.received_time(); |
| 306 data->dispatch = Time::Now().ToInternalValue(); | 306 data->dispatch = Time::Now().ToInternalValue(); |
| 307 data->params = params; | 307 data->params = params; |
| 308 data->message_name = message_name; | 308 data->message_name = message_name; |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 | 311 |
| 312 } | 312 } |
| 313 | 313 |
| 314 #endif // IPC_MESSAGE_LOG_ENABLED | 314 #endif // IPC_MESSAGE_LOG_ENABLED |
| OLD | NEW |