| Index: content/public/common/common_param_traits.cc
|
| diff --git a/content/public/common/common_param_traits.cc b/content/public/common/common_param_traits.cc
|
| index 3fcfdda02de585798129621632ded831b39508b0..ce87211082f68cd589f3547e5f7fc27953663957 100644
|
| --- a/content/public/common/common_param_traits.cc
|
| +++ b/content/public/common/common_param_traits.cc
|
| @@ -7,8 +7,10 @@
|
| #include <string>
|
|
|
| #include "content/public/common/content_constants.h"
|
| +#include "content/public/common/message_port.h"
|
| #include "content/public/common/page_state.h"
|
| #include "content/public/common/referrer.h"
|
| +#include "ipc/ipc_mojo_param_traits.h"
|
| #include "net/base/host_port_pair.h"
|
| #include "net/base/ip_address.h"
|
| #include "net/base/ip_endpoint.h"
|
| @@ -146,6 +148,31 @@ void ParamTraits<net::IPAddress>::Log(const param_type& p, std::string* l) {
|
| LogParam("IPAddress:" + (p.empty() ? "(empty)" : p.ToString()), l);
|
| }
|
|
|
| +void ParamTraits<content::MessagePort>::GetSize(base::PickleSizer* s,
|
| + const param_type& p) {
|
| + ParamTraits<mojo::MessagePipeHandle>::GetSize(s, p.GetHandle().get());
|
| +}
|
| +
|
| +void ParamTraits<content::MessagePort>::Write(base::Pickle* m,
|
| + const param_type& p) {
|
| + ParamTraits<mojo::MessagePipeHandle>::Write(m, p.ReleaseHandle().release());
|
| +}
|
| +
|
| +bool ParamTraits<content::MessagePort>::Read(
|
| + const base::Pickle* m,
|
| + base::PickleIterator* iter,
|
| + param_type* r) {
|
| + mojo::MessagePipeHandle handle;
|
| + if (!ParamTraits<mojo::MessagePipeHandle>::Read(m, iter, &handle))
|
| + return false;
|
| + *r = content::MessagePort(mojo::ScopedMessagePipeHandle(handle));
|
| + return true;
|
| +}
|
| +
|
| +void ParamTraits<content::MessagePort>::Log(
|
| + const param_type& p, std::string* l) {
|
| +}
|
| +
|
| void ParamTraits<content::PageState>::GetSize(base::PickleSizer* s,
|
| const param_type& p) {
|
| GetParamSize(s, p.ToEncodedData());
|
|
|