From 8bf55ca1e18b9474eea356a2ca75ddc016e46bee Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Mon, 17 Oct 2011 22:15:27 +0000 Subject: Fix IPC logging on Windows. Review URL: http://codereview.chromium.org/8322013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105937 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_message_macros.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ipc/ipc_message_macros.h') diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index 77a8415..7941f43 100644 --- a/ipc/ipc_message_macros.h +++ b/ipc/ipc_message_macros.h @@ -600,6 +600,7 @@ typedef IPC::Message Schema; \ enum { ID = IPC_MESSAGE_ID() }; \ msg_class() : IPC::Message(MSG_ROUTING_CONTROL, ID, PRIORITY_NORMAL) {} \ + static void Log(std::string* name, const Message* msg, std::string* l); \ }; #define IPC_EMPTY_ROUTED_DECL(msg_class, in_cnt, out_cnt, in_list, out_list) \ @@ -609,6 +610,7 @@ enum { ID = IPC_MESSAGE_ID() }; \ msg_class(int32 routing_id) \ : IPC::Message(routing_id, ID, PRIORITY_NORMAL) {} \ + static void Log(std::string* name, const Message* msg, std::string* l); \ }; #define IPC_ASYNC_CONTROL_DECL(msg_class, in_cnt, out_cnt, in_list, out_list) \ @@ -753,7 +755,13 @@ return Schema::ReadReplyParam(msg, p); \ } -#define IPC_EMPTY_MESSAGE_LOG(msg_class) +#define IPC_EMPTY_MESSAGE_LOG(msg_class) \ + void msg_class::Log(std::string* name, \ + const Message* msg, \ + std::string* l) { \ + if (name) \ + *name = #msg_class; \ + } #define IPC_ASYNC_MESSAGE_LOG(msg_class) \ void msg_class::Log(std::string* name, \ -- cgit v1.1