OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class NET_API AddressList { | 21 class NET_API AddressList { |
22 public: | 22 public: |
23 // Constructs an invalid address list. Should not call any methods on this | 23 // Constructs an invalid address list. Should not call any methods on this |
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. |
| 32 static AddressList CreateFromIPAddressList( |
| 33 const std::vector<IPAddressNumber>& addresses, |
| 34 uint16 port); |
| 35 |
31 // Creates an address list for a single IP literal. | 36 // Creates an address list for a single IP literal. |
32 static AddressList CreateFromIPAddress( | 37 static AddressList CreateFromIPAddress( |
33 const IPAddressNumber& address, | 38 const IPAddressNumber& address, |
34 uint16 port); | 39 uint16 port); |
35 | 40 |
36 // Creates an address list for a single IP literal. If | 41 // Creates an address list for a single IP literal. If |
37 // |canonicalize_name| is true, fill the ai_canonname field with the | 42 // |canonicalize_name| is true, fill the ai_canonname field with the |
38 // canonicalized IP address. | 43 // canonicalized IP address. |
39 static AddressList CreateFromIPAddressWithCname( | 44 static AddressList CreateFromIPAddressWithCname( |
40 const IPAddressNumber& address, | 45 const IPAddressNumber& address, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 struct Data; | 107 struct Data; |
103 | 108 |
104 explicit AddressList(Data* data); | 109 explicit AddressList(Data* data); |
105 | 110 |
106 scoped_refptr<Data> data_; | 111 scoped_refptr<Data> data_; |
107 }; | 112 }; |
108 | 113 |
109 } // namespace net | 114 } // namespace net |
110 | 115 |
111 #endif // NET_BASE_ADDRESS_LIST_H_ | 116 #endif // NET_BASE_ADDRESS_LIST_H_ |
OLD | NEW |