| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ | 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ |
| 6 #define IPC_IPC_MESSAGE_UTILS_H_ | 6 #define IPC_IPC_MESSAGE_UTILS_H_ |
| 7 | 7 |
| 8 #include <limits.h> | 8 #include <limits.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 } | 506 } |
| 507 static void Log(const param_type& p, std::string* l) { | 507 static void Log(const param_type& p, std::string* l) { |
| 508 l->append("("); | 508 l->append("("); |
| 509 LogParam(p.first, l); | 509 LogParam(p.first, l); |
| 510 l->append(", "); | 510 l->append(", "); |
| 511 LogParam(p.second, l); | 511 LogParam(p.second, l); |
| 512 l->append(")"); | 512 l->append(")"); |
| 513 } | 513 } |
| 514 }; | 514 }; |
| 515 | 515 |
| 516 // IPC ParamTraits ------------------------------------------------------------- | |
| 517 template <> | |
| 518 struct IPC_EXPORT ParamTraits<BrokerableAttachment::AttachmentId> { | |
| 519 typedef BrokerableAttachment::AttachmentId param_type; | |
| 520 static void Write(base::Pickle* m, const param_type& p); | |
| 521 static bool Read(const base::Pickle* m, | |
| 522 base::PickleIterator* iter, | |
| 523 param_type* r); | |
| 524 static void Log(const param_type& p, std::string* l); | |
| 525 }; | |
| 526 | |
| 527 // Base ParamTraits ------------------------------------------------------------ | 516 // Base ParamTraits ------------------------------------------------------------ |
| 528 | 517 |
| 529 template <> | 518 template <> |
| 530 struct IPC_EXPORT ParamTraits<base::DictionaryValue> { | 519 struct IPC_EXPORT ParamTraits<base::DictionaryValue> { |
| 531 typedef base::DictionaryValue param_type; | 520 typedef base::DictionaryValue param_type; |
| 532 static void GetSize(base::PickleSizer* sizer, const param_type& p); | 521 static void GetSize(base::PickleSizer* sizer, const param_type& p); |
| 533 static void Write(base::Pickle* m, const param_type& p); | 522 static void Write(base::Pickle* m, const param_type& p); |
| 534 static bool Read(const base::Pickle* m, | 523 static bool Read(const base::Pickle* m, |
| 535 base::PickleIterator* iter, | 524 base::PickleIterator* iter, |
| 536 param_type* r); | 525 param_type* r); |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 template <class ReplyParamType> | 1141 template <class ReplyParamType> |
| 1153 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, | 1142 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, |
| 1154 const Message* msg) {} | 1143 const Message* msg) {} |
| 1155 | 1144 |
| 1156 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} | 1145 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} |
| 1157 #endif | 1146 #endif |
| 1158 | 1147 |
| 1159 } // namespace IPC | 1148 } // namespace IPC |
| 1160 | 1149 |
| 1161 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 1150 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
| OLD | NEW |