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

Unified Diff: chrome/tools/ipclist/ipcfuzz.cc

Issue 15841011: Implement off-the-wire validation scheme for enum types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add () around macro parameter. Created 7 years, 7 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
« no previous file with comments | « chrome/common/common_param_traits_macros.h ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/ipclist/ipcfuzz.cc
diff --git a/chrome/tools/ipclist/ipcfuzz.cc b/chrome/tools/ipclist/ipcfuzz.cc
index 1d288c57f5db4cdf6a91aa6cc2bec70c3ea6d01e..764c0cffb8bd55fb2e683803a5ff574e4063ad91 100644
--- a/chrome/tools/ipclist/ipcfuzz.cc
+++ b/chrome/tools/ipclist/ipcfuzz.cc
@@ -510,13 +510,11 @@ class PickleCracker : public Pickle {
#include "ipc/ipc_message_null_macros.h"
// STRUCT declarations cause corresponding STRUCT_TRAITS declarations to occur.
-#undef IPC_STRUCT_BEGIN
#undef IPC_STRUCT_BEGIN_WITH_PARENT
#undef IPC_STRUCT_MEMBER
#undef IPC_STRUCT_END
#define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent)\
- IPC_STRUCT_BEGIN(struct_name)
-#define IPC_STRUCT_BEGIN(struct_name) IPC_STRUCT_TRAITS_BEGIN(struct_name)
+ IPC_STRUCT_TRAITS_BEGIN(struct_name)
#define IPC_STRUCT_MEMBER(type, name, ...) IPC_STRUCT_TRAITS_MEMBER(name)
#define IPC_STRUCT_END() IPC_STRUCT_TRAITS_END()
@@ -540,8 +538,8 @@ class PickleCracker : public Pickle {
} \
};
-#undef IPC_ENUM_TRAITS
-#define IPC_ENUM_TRAITS(enum_name) \
+#undef IPC_ENUM_TRAITS_VALIDATE
+#define IPC_ENUM_TRAITS_VALIDATE(enum_name, validation_expression) \
template <> \
struct FuzzTraits<enum_name> { \
static void Fuzz(enum_name* p, IPC::Fuzzer* fuzzer) { \
« no previous file with comments | « chrome/common/common_param_traits_macros.h ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698