| 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 #include "content/public/common/common_param_traits.h" | 5 #include "content/public/common/common_param_traits.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "content/public/common/content_constants.h" | 9 #include "content/public/common/content_constants.h" |
| 10 #include "content/public/common/page_state.h" | 10 #include "content/public/common/page_state.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 r->set_host(host); | 109 r->set_host(host); |
| 110 r->set_port(port); | 110 r->set_port(port); |
| 111 return true; | 111 return true; |
| 112 } | 112 } |
| 113 | 113 |
| 114 void ParamTraits<net::HostPortPair>::Log(const param_type& p, std::string* l) { | 114 void ParamTraits<net::HostPortPair>::Log(const param_type& p, std::string* l) { |
| 115 l->append(p.ToString()); | 115 l->append(p.ToString()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void ParamTraits<net::IPEndPoint>::Write(Message* m, const param_type& p) { | 118 void ParamTraits<net::IPEndPoint>::Write(Message* m, const param_type& p) { |
| 119 WriteParam(m, p.address()); | 119 WriteParam(m, p.address_number()); |
| 120 WriteParam(m, p.port()); | 120 WriteParam(m, p.port()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool ParamTraits<net::IPEndPoint>::Read(const Message* m, | 123 bool ParamTraits<net::IPEndPoint>::Read(const Message* m, |
| 124 base::PickleIterator* iter, | 124 base::PickleIterator* iter, |
| 125 param_type* p) { | 125 param_type* p) { |
| 126 net::IPAddressNumber address; | 126 net::IPAddressNumber address; |
| 127 uint16_t port; | 127 uint16_t port; |
| 128 if (!ReadParam(m, iter, &address) || !ReadParam(m, iter, &port)) | 128 if (!ReadParam(m, iter, &address) || !ReadParam(m, iter, &port)) |
| 129 return false; | 129 return false; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 #undef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_ | 200 #undef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_ |
| 201 #include "content/public/common/common_param_traits_macros.h" | 201 #include "content/public/common/common_param_traits_macros.h" |
| 202 } // namespace IPC | 202 } // namespace IPC |
| 203 | 203 |
| 204 // Generate param traits log methods. | 204 // Generate param traits log methods. |
| 205 #include "ipc/param_traits_log_macros.h" | 205 #include "ipc/param_traits_log_macros.h" |
| 206 namespace IPC { | 206 namespace IPC { |
| 207 #undef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_ | 207 #undef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_ |
| 208 #include "content/public/common/common_param_traits_macros.h" | 208 #include "content/public/common/common_param_traits_macros.h" |
| 209 } // namespace IPC | 209 } // namespace IPC |
| OLD | NEW |