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

Unified Diff: ipc/ipc_message_utils.h

Issue 3522004: FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 3 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
Index: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index dc1d35ff78e80e48dd2adeccb94576109eaec008..0e22c6bea39b6cc54278d648177108b55801ed79 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!
}

Powered by Google App Engine
This is Rietveld 408576698