summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 19:11:24 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 19:11:24 +0000
commit8bef70e795409e0b6c3378d28873bcf3f9693752 (patch)
tree130d9eaf7e86d43a1baf01f786f266e79a34c6b5 /chrome/common
parent5adcb96e1b42be497be861d437acfa3b75c39d8f (diff)
downloadchromium_src-8bef70e795409e0b6c3378d28873bcf3f9693752.zip
chromium_src-8bef70e795409e0b6c3378d28873bcf3f9693752.tar.gz
chromium_src-8bef70e795409e0b6c3378d28873bcf3f9693752.tar.bz2
Add routing_id to the ipc debugging log output.
Review URL: http://codereview.chromium.org/66051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/ipc_logging.cc4
-rw-r--r--chrome/common/ipc_message_utils.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/chrome/common/ipc_logging.cc b/chrome/common/ipc_logging.cc
index cb63533..0f49b39 100644
--- a/chrome/common/ipc_logging.cc
+++ b/chrome/common/ipc_logging.cc
@@ -268,8 +268,9 @@ void Logging::Log(const LogData& data) {
}
#elif defined(OS_POSIX)
// On POSIX, for now, we just dump the log to stderr
- fprintf(stderr, "ipc %s %d %s %s %s\n",
+ fprintf(stderr, "ipc %s %d %d %s %s %s\n",
WideToUTF8(data.channel).c_str(),
+ data.routing_id,
data.type,
WideToUTF8(data.flags).c_str(),
WideToUTF8(data.message_name).c_str(),
@@ -305,6 +306,7 @@ void GenerateLogData(const std::wstring& channel, const Message& message,
Logging::GetMessageText(message.type(), &message_name, &message, &params);
data->channel = channel;
+ data->routing_id = message.routing_id();
data->type = message.type();
data->flags = flags;
data->sent = message.sent_time();
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h
index 6e82d40..8e4e8a5 100644
--- a/chrome/common/ipc_message_utils.h
+++ b/chrome/common/ipc_message_utils.h
@@ -830,6 +830,7 @@ struct ParamTraits<WebCursor> {
struct LogData {
std::wstring channel;
+ int32 routing_id;
uint16 type;
std::wstring flags;
int64 sent; // Time that the message was sent (i.e. at Send()).
@@ -846,6 +847,7 @@ struct ParamTraits<LogData> {
typedef LogData param_type;
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.channel);
+ WriteParam(m, p.routing_id);
WriteParam(m, static_cast<int>(p.type));
WriteParam(m, p.flags);
WriteParam(m, p.sent);
@@ -857,6 +859,7 @@ struct ParamTraits<LogData> {
int type;
bool result =
ReadParam(m, iter, &r->channel) &&
+ ReadParam(m, iter, &r->routing_id);
ReadParam(m, iter, &type) &&
ReadParam(m, iter, &r->flags) &&
ReadParam(m, iter, &r->sent) &&