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

Unified Diff: ipc/ipc_message_macros.h

Issue 11347012: Split IPC logging between content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ipc/ipc_message_macros.h
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index f77abb249229b3d8bf71c9930dca7b4cf6dad0c8..2993014f0468539f89afaf4c0089d6c8d2689e7f 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -800,19 +800,9 @@
#elif defined(IPC_MESSAGE_MACROS_LOG_ENABLED)
-#ifndef IPC_LOG_TABLE_CREATED
-#define IPC_LOG_TABLE_CREATED
-
-#include "base/hash_tables.h"
-
-typedef void (*LogFunction)(std::string* name,
- const IPC::Message* msg,
- std::string* params);
-
-typedef base::hash_map<uint32, LogFunction > LogFunctionMap;
-LogFunctionMap g_log_function_mapping;
-
-#endif // IPC_LOG_TABLE_CREATED
+#ifndef IPC_LOG_TABLE_ADD_ENTRY
+#error You need to define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger)
+#endif
// "Log table" inclusion produces extra logging registration code.
#define IPC_MESSAGE_EXTRA(sync, kind, msg_class, \
@@ -821,7 +811,7 @@ LogFunctionMap g_log_function_mapping;
public: \
LoggerRegisterHelper##msg_class() { \
const uint32 msg_id = static_cast<uint32>(msg_class::ID); \
- g_log_function_mapping[msg_id] = msg_class::Log; \
+ IPC_LOG_TABLE_ADD_ENTRY(msg_id, msg_class::Log); \
} \
}; \
LoggerRegisterHelper##msg_class g_LoggerRegisterHelper##msg_class;

Powered by Google App Engine
This is Rietveld 408576698