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

Unified Diff: net/dns/mojo_host_struct_traits.h

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: resolve code review comments from dcheng Created 3 years, 9 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
Index: net/dns/mojo_host_struct_traits.h
diff --git a/net/dns/mojo_host_struct_traits.h b/net/dns/mojo_host_struct_traits.h
index 307e1b22ba8371aa75bb145abc95825e6270c523..3dcc7d6071a9a8fc13e4492c9b4086d7fabd71f8 100644
--- a/net/dns/mojo_host_struct_traits.h
+++ b/net/dns/mojo_host_struct_traits.h
@@ -49,6 +49,15 @@ struct StructTraits<net::interfaces::HostResolverRequestInfoDataView,
};
template <>
+struct StructTraits<net::interfaces::IPAddressDataView, net::IPAddress> {
dcheng 2017/03/07 19:54:32 Basically, just take this and move it to a new moj
zhaobin 2017/03/10 01:42:27 Done.
+ static const std::vector<uint8_t>& address(const net::IPAddress& obj) {
+ return obj.bytes();
+ }
+
+ static bool Read(net::interfaces::IPAddressDataView obj, net::IPAddress* out);
+};
+
+template <>
struct StructTraits<net::interfaces::IPEndPointDataView, net::IPEndPoint> {
static const std::vector<uint8_t>& address(const net::IPEndPoint& obj) {
return obj.address().bytes();

Powered by Google App Engine
This is Rietveld 408576698