Chromium Code Reviews| Index: net/base/address_list.cc |
| diff --git a/net/base/address_list.cc b/net/base/address_list.cc |
| index 5442687f90f2c45fb37a78b84d453564809d3ed3..b2e613fe325f5836c7ee9d202ccd9b1fac68683f 100644 |
| --- a/net/base/address_list.cc |
| +++ b/net/base/address_list.cc |
| @@ -112,7 +112,7 @@ AddressList& AddressList::operator=(const AddressList& addresslist) { |
| // static |
| AddressList AddressList::CreateFromIPAddressList( |
| const IPAddressList& addresses, |
| - uint16 port) { |
| + const std::string& canonical_name) { |
|
cbentzel
2012/02/10 19:51:08
Why were you able to get rid of port here? Was it
szym
2012/02/10 21:49:36
It was only used in AsyncHostResolver, and the use
|
| DCHECK(!addresses.empty()); |
| struct addrinfo* head = NULL; |
| struct addrinfo* next = NULL; |
| @@ -121,13 +121,15 @@ AddressList AddressList::CreateFromIPAddressList( |
| it != addresses.end(); ++it) { |
| if (head == NULL) { |
| head = next = CreateAddrInfo(*it, false); |
| + if (!canonical_name.empty()) { |
| + head->ai_canonname = do_strdup(canonical_name.c_str()); |
| + } |
| } else { |
| next->ai_next = CreateAddrInfo(*it, false); |
| next = next->ai_next; |
| } |
| } |
| - SetPortForAllAddrinfos(head, port); |
| return AddressList(new Data(head, false)); |
| } |