| OLD | NEW |
| 1 // Copyright (c) 2011 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 #ifndef NET_BASE_ADDRESS_LIST_H_ | 5 #ifndef NET_BASE_ADDRESS_LIST_H_ |
| 6 #define NET_BASE_ADDRESS_LIST_H_ | 6 #define NET_BASE_ADDRESS_LIST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 24 // other than assignment. | 24 // other than assignment. |
| 25 AddressList(); | 25 AddressList(); |
| 26 | 26 |
| 27 AddressList(const AddressList& addresslist); | 27 AddressList(const AddressList& addresslist); |
| 28 ~AddressList(); | 28 ~AddressList(); |
| 29 AddressList& operator=(const AddressList& addresslist); | 29 AddressList& operator=(const AddressList& addresslist); |
| 30 | 30 |
| 31 // Creates an address list for a list of IP literals. | 31 // Creates an address list for a list of IP literals. |
| 32 static AddressList CreateFromIPAddressList( | 32 static AddressList CreateFromIPAddressList( |
| 33 const IPAddressList& addresses, | 33 const IPAddressList& addresses, |
| 34 uint16 port); | 34 const std::string& canonical_name); |
| 35 | 35 |
| 36 // Creates an address list for a single IP literal. | 36 // Creates an address list for a single IP literal. |
| 37 static AddressList CreateFromIPAddress( | 37 static AddressList CreateFromIPAddress( |
| 38 const IPAddressNumber& address, | 38 const IPAddressNumber& address, |
| 39 uint16 port); | 39 uint16 port); |
| 40 | 40 |
| 41 // Creates an address list for a single IP literal. If | 41 // Creates an address list for a single IP literal. If |
| 42 // |canonicalize_name| is true, fill the ai_canonname field with the | 42 // |canonicalize_name| is true, fill the ai_canonname field with the |
| 43 // canonicalized IP address. | 43 // canonicalized IP address. |
| 44 static AddressList CreateFromIPAddressWithCname( | 44 static AddressList CreateFromIPAddressWithCname( |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 // Helper to create an AddressList that has a particular port. It has an | 114 // Helper to create an AddressList that has a particular port. It has an |
| 115 // optimization to avoid allocating a new address linked list when the | 115 // optimization to avoid allocating a new address linked list when the |
| 116 // port is already what we want. | 116 // port is already what we want. |
| 117 AddressList NET_EXPORT CreateAddressListUsingPort(const AddressList& src, | 117 AddressList NET_EXPORT CreateAddressListUsingPort(const AddressList& src, |
| 118 int port); | 118 int port); |
| 119 | 119 |
| 120 } // namespace net | 120 } // namespace net |
| 121 | 121 |
| 122 #endif // NET_BASE_ADDRESS_LIST_H_ | 122 #endif // NET_BASE_ADDRESS_LIST_H_ |
| OLD | NEW |