diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 20:06:30 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 20:06:30 +0000 |
commit | 20f0487a5b73e8071af2612150301b0942cbf0e2 (patch) | |
tree | ecee69b28f16712bdc1558ac0a015ac80095c761 /ipc/ipc_message_utils.h | |
parent | 167b0dd17d5ed57ff293b6480ccaed706e0bc9cb (diff) | |
download | chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.zip chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.tar.gz chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.tar.bz2 |
FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs.
Cuts ~2MB off our .a files (Debug, Linux). Also added the "virtual" keyword on
a whole bunch of virtual dtors that were missing it.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3522004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_utils.h')
-rw-r--r-- | ipc/ipc_message_utils.h | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h index dc1d35f..0e22c6b 100644 --- a/ipc/ipc_message_utils.h +++ b/ipc/ipc_message_utils.h @@ -730,6 +730,9 @@ struct ParamTraits<XFORM> { #endif // defined(OS_WIN) struct LogData { + LogData(); + ~LogData(); + std::string channel; int32 routing_id; uint32 type; // "User-defined" message type, from ipc_message.h. @@ -746,30 +749,8 @@ struct LogData { template <> struct ParamTraits<LogData> { typedef LogData param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.channel); - WriteParam(m, p.routing_id); - WriteParam(m, static_cast<int>(p.type)); - WriteParam(m, p.flags); - WriteParam(m, p.sent); - WriteParam(m, p.receive); - WriteParam(m, p.dispatch); - WriteParam(m, p.params); - } - static bool Read(const Message* m, void** iter, param_type* r) { - int type; - bool result = - ReadParam(m, iter, &r->channel) && - ReadParam(m, iter, &r->routing_id) && - ReadParam(m, iter, &type) && - ReadParam(m, iter, &r->flags) && - ReadParam(m, iter, &r->sent) && - ReadParam(m, iter, &r->receive) && - ReadParam(m, iter, &r->dispatch) && - ReadParam(m, iter, &r->params); - r->type = static_cast<uint16>(type); - return result; - } + static void Write(Message* m, const param_type& p); + static bool Read(const Message* m, void** iter, param_type* r); static void Log(const param_type& p, std::string* l) { // Doesn't make sense to implement this! } |