OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "net/dns/mojo_host_struct_traits.h" | 5 #include "net/dns/mojo_host_struct_traits.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "base/memory/ptr_util.h" |
9 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
10 | 11 |
11 namespace mojo { | 12 namespace mojo { |
12 | 13 |
13 // static | 14 // static |
14 bool EnumTraits<net::interfaces::AddressFamily, net::AddressFamily>::FromMojom( | 15 bool EnumTraits<net::interfaces::AddressFamily, net::AddressFamily>::FromMojom( |
15 net::interfaces::AddressFamily address_family, | 16 net::interfaces::AddressFamily address_family, |
16 net::AddressFamily* out) { | 17 net::AddressFamily* out) { |
17 using net::interfaces::AddressFamily; | 18 using net::interfaces::AddressFamily; |
18 switch (address_family) { | 19 switch (address_family) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 81 } |
81 | 82 |
82 // static | 83 // static |
83 bool StructTraits<net::interfaces::AddressListDataView, net::AddressList>::Read( | 84 bool StructTraits<net::interfaces::AddressListDataView, net::AddressList>::Read( |
84 net::interfaces::AddressListDataView data, | 85 net::interfaces::AddressListDataView data, |
85 net::AddressList* out) { | 86 net::AddressList* out) { |
86 return data.ReadAddresses(&out->endpoints()); | 87 return data.ReadAddresses(&out->endpoints()); |
87 } | 88 } |
88 | 89 |
89 } // namespace mojo | 90 } // namespace mojo |
OLD | NEW |