| Index: content/common/p2p_messages.cc
|
| diff --git a/content/common/p2p_messages.cc b/content/common/p2p_messages.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..82c59834173fe5b665c530bc3497744d65b54fc8
|
| --- /dev/null
|
| +++ b/content/common/p2p_messages.cc
|
| @@ -0,0 +1,31 @@
|
| +// Copyright (c) 2011 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.
|
| +
|
| +#define IPC_MESSAGE_IMPL
|
| +#include "content/common/p2p_messages.h"
|
| +
|
| +namespace IPC {
|
| +
|
| +void ParamTraits<P2PSocketAddress>::Write(Message* m, const param_type& p) {
|
| + WriteParam(m, p.address);
|
| + WriteParam(m, p.port);
|
| +}
|
| +
|
| +bool ParamTraits<P2PSocketAddress>::Read(const Message* m,
|
| + void** iter,
|
| + param_type* p) {
|
| + return
|
| + ReadParam(m, iter, &p->address) &&
|
| + ReadParam(m, iter, &p->port);
|
| +}
|
| +
|
| +void ParamTraits<P2PSocketAddress>::Log(const param_type& p, std::string* l) {
|
| + l->append("(");
|
| + LogParam(p.address, l);
|
| + l->append(", ");
|
| + LogParam(p.port, l);
|
| + l->append(")");
|
| +}
|
| +
|
| +} // namespace IPC
|
|
|