| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 param_type* r) { | 258 param_type* r) { |
| 259 return m->ReadWString(iter, r); | 259 return m->ReadWString(iter, r); |
| 260 } | 260 } |
| 261 IPC_EXPORT static void Log(const param_type& p, std::string* l); | 261 IPC_EXPORT static void Log(const param_type& p, std::string* l); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 // If WCHAR_T_IS_UTF16 is defined, then string16 is a std::wstring so we don't | 264 // If WCHAR_T_IS_UTF16 is defined, then string16 is a std::wstring so we don't |
| 265 // need this trait. | 265 // need this trait. |
| 266 #if !defined(WCHAR_T_IS_UTF16) | 266 #if !defined(WCHAR_T_IS_UTF16) |
| 267 template <> | 267 template <> |
| 268 struct ParamTraits<string16> { | 268 struct ParamTraits<base::string16> { |
| 269 typedef string16 param_type; | 269 typedef base::string16 param_type; |
| 270 static void Write(Message* m, const param_type& p) { | 270 static void Write(Message* m, const param_type& p) { |
| 271 m->WriteString16(p); | 271 m->WriteString16(p); |
| 272 } | 272 } |
| 273 static bool Read(const Message* m, PickleIterator* iter, | 273 static bool Read(const Message* m, PickleIterator* iter, |
| 274 param_type* r) { | 274 param_type* r) { |
| 275 return m->ReadString16(iter, r); | 275 return m->ReadString16(iter, r); |
| 276 } | 276 } |
| 277 IPC_EXPORT static void Log(const param_type& p, std::string* l); | 277 IPC_EXPORT static void Log(const param_type& p, std::string* l); |
| 278 }; | 278 }; |
| 279 #endif | 279 #endif |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 template<typename TA, typename TB, typename TC, typename TD, typename TE> | 878 template<typename TA, typename TB, typename TC, typename TD, typename TE> |
| 879 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { | 879 static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) { |
| 880 ReplyParam p(a, b, c, d, e); | 880 ReplyParam p(a, b, c, d, e); |
| 881 WriteParam(reply, p); | 881 WriteParam(reply, p); |
| 882 } | 882 } |
| 883 }; | 883 }; |
| 884 | 884 |
| 885 } // namespace IPC | 885 } // namespace IPC |
| 886 | 886 |
| 887 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 887 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
| OLD | NEW |