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

Unified Diff: tools/ipc_fuzzer/message_tools/message_list.cc

Issue 1532053002: use variadic macros/templates in IPC message implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify Created 5 years 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: tools/ipc_fuzzer/message_tools/message_list.cc
diff --git a/tools/ipc_fuzzer/message_tools/message_list.cc b/tools/ipc_fuzzer/message_tools/message_list.cc
index d23ac29173efdef5cba1dd2e7b55be89004de6f8..6774aed97400c1133b71f11bbfd4bf8586e71894 100644
--- a/tools/ipc_fuzzer/message_tools/message_list.cc
+++ b/tools/ipc_fuzzer/message_tools/message_list.cc
@@ -16,8 +16,6 @@ struct msginfo {
const char* name;
const char* file;
int id;
- int in_count;
- int out_count;
bool operator< (const msginfo& other) const {
return id < other.id;
@@ -27,8 +25,9 @@ struct msginfo {
// Redefine macros to generate table
#include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
#undef IPC_MESSAGE_DECL
-#define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
- { #name, __FILE__, IPC_MESSAGE_ID(), in, out },
+#define IPC_MESSAGE_DECL(name, ...) \
+ { #name, __FILE__, IPC_MESSAGE_ID() } \
+ ,
static msginfo msgtable[] = {
#include "tools/ipc_fuzzer/message_lib/all_messages.h"
@@ -141,12 +140,7 @@ static void dump_msgtable(bool show_args, bool show_ids,
std::cout << msgtable[i].id << " " <<
IPC_MESSAGE_ID_CLASS(msgtable[i].id) << "," <<
IPC_MESSAGE_ID_LINE(msgtable[i].id) << " ";
- std::cout << msgtable[i].name;
- if (show_args) {
- std::cout << "(" << msgtable[i].in_count << " IN, " <<
- msgtable[i].out_count << " OUT)";
- }
- std::cout << "\n";
+ std::cout << msgtable[i].name << "\n";
}
}
}
@@ -190,4 +184,3 @@ int main(int argc, char **argv) {
dump_msgtable(show_args, show_ids, show_comma, filter);
return 0;
}
-
« ipc/ipc_message_templates.h ('K') | « tools/ipc_fuzzer/message_lib/message_names.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698