| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/services/network/net_address_type_converters.h" | 5 #include "mojo/services/network/net_address_type_converters.h" |
| 6 | 6 |
| 7 namespace mojo { | 7 namespace mojo { |
| 8 | 8 |
| 9 // static | 9 // static |
| 10 net::IPEndPoint TypeConverter<net::IPEndPoint, NetAddressPtr>::Convert( | 10 net::IPEndPoint TypeConverter<net::IPEndPoint, NetAddressPtr>::Convert( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 case NET_ADDRESS_FAMILY_IPV6: | 45 case NET_ADDRESS_FAMILY_IPV6: |
| 46 net_address->ipv6 = NetAddressIPv6::New(); | 46 net_address->ipv6 = NetAddressIPv6::New(); |
| 47 net_address->family = NET_ADDRESS_FAMILY_IPV6; | 47 net_address->family = NET_ADDRESS_FAMILY_IPV6; |
| 48 net_address->ipv6->port = static_cast<uint16>(obj.port()); | 48 net_address->ipv6->port = static_cast<uint16>(obj.port()); |
| 49 net_address->ipv6->addr = Array<uint8_t>::From(obj.address()); | 49 net_address->ipv6->addr = Array<uint8_t>::From(obj.address()); |
| 50 break; | 50 break; |
| 51 default: | 51 default: |
| 52 break; | 52 break; |
| 53 } | 53 } |
| 54 | 54 |
| 55 return net_address.Pass(); | 55 return net_address; |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace mojo | 58 } // namespace mojo |
| OLD | NEW |