Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1088)

Unified Diff: content/public/common/common_param_traits.cc

Issue 138753004: Cast: IPC glue between cast library transport and encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor cleanup Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/common_param_traits.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e3eec02a7400af3a0db8ddd3994f362813b9f62c..7c47ab53907ae1b3c38154e6392244cdedff7fae 100644
--- a/content/public/common/common_param_traits.cc
+++ b/content/public/common/common_param_traits.cc
@@ -9,6 +9,7 @@
#include "content/public/common/referrer.h"
#include "content/public/common/url_utils.h"
#include "net/base/host_port_pair.h"
+#include "net/base/ip_endpoint.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_f.h"
@@ -108,6 +109,25 @@ void ParamTraits<net::HostPortPair>::Log(const param_type& p, std::string* l) {
l->append(p.ToString());
}
+void ParamTraits<net::IPEndPoint>::Write(Message* m, const param_type& p) {
+ WriteParam(m, p.address());
+ WriteParam(m, p.port());
+}
+
+bool ParamTraits<net::IPEndPoint>::Read(const Message* m, PickleIterator* iter,
+ param_type* p) {
+ net::IPAddressNumber address;
+ int port;
+ if (!ReadParam(m, iter, &address) || !ReadParam(m, iter, &port))
+ return false;
+ *p = net::IPEndPoint(address, port);
+ return true;
+}
+
+void ParamTraits<net::IPEndPoint>::Log(const param_type& p, std::string* l) {
+ LogParam("IPEndPoint:" + p.ToString(), l);
+}
+
void ParamTraits<content::PageState>::Write(
Message* m, const param_type& p) {
WriteParam(m, p.ToEncodedData());
« no previous file with comments | « content/public/common/common_param_traits.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698