OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/address_list.h" | 5 #include "net/base/address_list.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 dict->Set("address_list", std::move(list)); | 29 dict->Set("address_list", std::move(list)); |
30 return std::move(dict); | 30 return std::move(dict); |
31 } | 31 } |
32 | 32 |
33 } // namespace | 33 } // namespace |
34 | 34 |
35 AddressList::AddressList() {} | 35 AddressList::AddressList() {} |
36 | 36 |
| 37 AddressList::AddressList(const AddressList&) = default; |
| 38 |
37 AddressList::~AddressList() {} | 39 AddressList::~AddressList() {} |
38 | 40 |
39 AddressList::AddressList(const IPEndPoint& endpoint) { | 41 AddressList::AddressList(const IPEndPoint& endpoint) { |
40 push_back(endpoint); | 42 push_back(endpoint); |
41 } | 43 } |
42 | 44 |
43 // static | 45 // static |
44 AddressList AddressList::CreateFromIPAddress(const IPAddress& address, | 46 AddressList AddressList::CreateFromIPAddress(const IPAddress& address, |
45 uint16_t port) { | 47 uint16_t port) { |
46 return AddressList(IPEndPoint(address, port)); | 48 return AddressList(IPEndPoint(address, port)); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void AddressList::SetDefaultCanonicalName() { | 90 void AddressList::SetDefaultCanonicalName() { |
89 DCHECK(!empty()); | 91 DCHECK(!empty()); |
90 set_canonical_name(front().ToStringWithoutPort()); | 92 set_canonical_name(front().ToStringWithoutPort()); |
91 } | 93 } |
92 | 94 |
93 NetLog::ParametersCallback AddressList::CreateNetLogCallback() const { | 95 NetLog::ParametersCallback AddressList::CreateNetLogCallback() const { |
94 return base::Bind(&NetLogAddressListCallback, this); | 96 return base::Bind(&NetLogAddressListCallback, this); |
95 } | 97 } |
96 | 98 |
97 } // namespace net | 99 } // namespace net |
OLD | NEW |