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

Unified Diff: ipc/param_traits_macros.h

Issue 1655333002: Add message sizing to basic IPC traits and struct macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@with-pickles
Patch Set: include ArrayHeader in size (oops!) and ensure the buffer doesn't relocate Created 4 years, 10 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 | « ipc/ipc_message_utils_unittest.cc ('k') | ipc/param_traits_size_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/param_traits_macros.h
diff --git a/ipc/param_traits_macros.h b/ipc/param_traits_macros.h
index 7c4cc69275bc1ec209afe7fe34aa20a24bb18b38..100344023824d480826e7202add8001d937a7273 100644
--- a/ipc/param_traits_macros.h
+++ b/ipc/param_traits_macros.h
@@ -13,6 +13,8 @@
template <> \
struct IPC_MESSAGE_EXPORT ParamTraits<struct_name> { \
typedef struct_name param_type; \
+ static void GetSize(base::PickleSizer* sizer, \
+ const param_type& p); \
static void Write(base::Pickle* m, const param_type& p); \
static bool Read(const base::Pickle* m, \
base::PickleIterator* iter, \
@@ -53,6 +55,8 @@
template <> \
struct IPC_MESSAGE_EXPORT ParamTraits<enum_name> { \
typedef enum_name param_type; \
+ static void GetSize(base::PickleSizer* sizer, \
+ const param_type& p); \
static void Write(base::Pickle* m, const param_type& p); \
static bool Read(const base::Pickle* m, \
base::PickleIterator* iter, \
« no previous file with comments | « ipc/ipc_message_utils_unittest.cc ('k') | ipc/param_traits_size_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698