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

Unified Diff: ipc/ipc_message_utils_impl.h

Issue 3018045: FBTF: Allow forward declaration of classes passed to sync IPC messages. (Closed)
Patch Set: Fix linkage problems with previous patch. Created 10 years, 4 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.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils_impl.h
diff --git a/ipc/ipc_message_utils_impl.h b/ipc/ipc_message_utils_impl.h
index 91b4ac9e7ce22c0cd90939d5b623aec923960e66..b3a3a7b70fe3fa579296409d91a30904d1156a7b 100644
--- a/ipc/ipc_message_utils_impl.h
+++ b/ipc/ipc_message_utils_impl.h
@@ -18,19 +18,26 @@ MessageWithTuple<ParamType>::MessageWithTuple(
WriteParam(this, p);
}
-template <class ParamType>
-bool MessageWithTuple<ParamType>::Read(const Message* msg, Param* p) {
- void* iter = NULL;
- if (ReadParam(msg, &iter, p))
- return true;
- NOTREACHED() << "Error deserializing message " << msg->type();
- return false;
-}
+// TODO(erg): Migrate the Read() methods here when I figure out the linkage
+// problems that broke the release build.
// We can't migrate the template for Log() to MessageWithTuple, because each
// subclass needs to have Log() to call Read(), which instantiates the above
// template.
+template <class SendParamType, class ReplyParamType>
+MessageWithReply<SendParamType, ReplyParamType>::MessageWithReply(
+ int32 routing_id, uint32 type,
+ const RefSendParam& send,
+ const ReplyParam& reply)
+ : SyncMessage(routing_id, type, PRIORITY_NORMAL,
+ new ParamDeserializer<ReplyParam>(reply)) {
+ WriteParam(this, send);
+}
+
+// TODO(erg): Migrate ReadSendParam()/ReadReplyParam() here when we can force
+// the visibility/linkage.
+
} // namespace IPC
#endif // IPC_IPC_MESSAGE_UTILS_IMPL_H_
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698