Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: net/base/address_list.cc

Issue 9369045: [net] HostResolverImpl + DnsTransaction + DnsConfigService = Asynchronous DNS ready for experiments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for test-drive. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
}

Powered by Google App Engine
This is Rietveld 408576698