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

Unified Diff: ipc/ipc_message_utils_impl.h

Issue 1532053002: use variadic macros/templates in IPC message implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ipc_fuzzer build again Created 4 years, 11 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_impl.h
diff --git a/ipc/ipc_message_utils_impl.h b/ipc/ipc_message_utils_impl.h
deleted file mode 100644
index 485dca578e91c7f3360f30df1be5f0a3aeb37b13..0000000000000000000000000000000000000000
--- a/ipc/ipc_message_utils_impl.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// This file contains templates forward declared (but not defined) in
-// ipc_message_utils.h so that they are only instantiated in certain files,
-// notably a few IPC unit tests.
-
-#ifndef IPC_IPC_MESSAGE_UTILS_IMPL_H_
-#define IPC_IPC_MESSAGE_UTILS_IMPL_H_
-
-namespace IPC {
-
-template <class ParamType>
-void MessageSchema<ParamType>::Write(Message* msg, const RefParam& p) {
- WriteParam(msg, p);
-}
-
-template <class ParamType>
-bool MessageSchema<ParamType>::Read(const Message* msg, Param* p) {
- base::PickleIterator iter(*msg);
- if (ReadParam(msg, &iter, p))
- return true;
- NOTREACHED() << "Error deserializing message " << msg->type();
- return false;
-}
-
-template <class SendParamType, class ReplyParamType>
-void SyncMessageSchema<SendParamType, ReplyParamType>::Write(
- Message* msg,
- const RefSendParam& send) {
- WriteParam(msg, send);
-}
-
-template <class SendParamType, class ReplyParamType>
-bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadSendParam(
- const Message* msg, SendParam* p) {
- base::PickleIterator iter = SyncMessage::GetDataIterator(msg);
- return ReadParam(msg, &iter, p);
-}
-
-template <class SendParamType, class ReplyParamType>
-bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadReplyParam(
- const Message* msg, typename base::TupleTypes<ReplyParam>::ValueTuple* p) {
- base::PickleIterator iter = SyncMessage::GetDataIterator(msg);
- return ReadParam(msg, &iter, p);
-}
-
-} // namespace IPC
-
-#endif // IPC_IPC_MESSAGE_UTILS_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698