Chromium Code Reviews| Index: ipc/param_traits_write_macros.h |
| diff --git a/ipc/param_traits_write_macros.h b/ipc/param_traits_write_macros.h |
| index dd977cde8d8ace40a3251025e541f678c4f20a53..2fdb1e915ec3028c4bc99ab1fd3e04265b869339 100644 |
| --- a/ipc/param_traits_write_macros.h |
| +++ b/ipc/param_traits_write_macros.h |
| @@ -9,13 +9,11 @@ |
| #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() |
| @@ -30,8 +28,8 @@ |
| #define IPC_STRUCT_TRAITS_PARENT(type) ParamTraits<type>::Write(m, p); |
| #define IPC_STRUCT_TRAITS_END() } |
| -#undef IPC_ENUM_TRAITS |
| -#define IPC_ENUM_TRAITS(enum_name) \ |
| +#undef IPC_ENUM_TRAITS_VALIDATE |
| +#define IPC_ENUM_TRAITS_VALIDATE(enum_name, validation_expression) \ |
|
jam
2013/05/31 23:00:17
nit: for developer ease, perhaps test validation_e
Tom Sepez
2013/05/31 23:01:54
That's a great idea. I'll add it.
|
| void ParamTraits<enum_name>::Write(Message* m, const param_type& p) { \ |
| m->WriteInt(static_cast<int>(p)); \ |
| } |