Index: mojo/services/network/net_address_type_converters.h |
diff --git a/mojo/services/network/net_address_type_converters.h b/mojo/services/network/net_address_type_converters.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8ac63e3ce026e1103466840ef78ad619600c74bd |
--- /dev/null |
+++ b/mojo/services/network/net_address_type_converters.h |
@@ -0,0 +1,26 @@ |
+// Copyright 2014 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. |
+ |
+#ifndef MOJO_SERVICES_NETWORK_NET_ADDRESS_TYPE_CONVERTERS_H_ |
+#define MOJO_SERVICES_NETWORK_NET_ADDRESS_TYPE_CONVERTERS_H_ |
+ |
+#include "mojo/public/cpp/bindings/type_converter.h" |
+#include "mojo/services/public/interfaces/network/net_address.mojom.h" |
+#include "net/base/ip_endpoint.h" |
+ |
+namespace mojo { |
+ |
+template <> |
+struct TypeConverter<net::IPEndPoint, NetAddressPtr> { |
+ static net::IPEndPoint Convert(const NetAddressPtr& obj); |
+}; |
+ |
+template <> |
+struct TypeConverter<NetAddressPtr, net::IPEndPoint> { |
+ static NetAddressPtr Convert(const net::IPEndPoint& obj); |
+}; |
+ |
+} // namespace mojo |
+ |
+#endif // MOJO_SERVICES_NETWORK_NET_ADDRESS_TYPE_CONVERTERS_H_ |