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

Side by Side Diff: ipc/ipc_logging.cc

Issue 10701052: This change list fixed the issue of #135391, sometimes the channel_id of Logged IPC message is empty (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 | « AUTHORS ('k') | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698