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

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: Denitted. 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
« no previous file with comments | « net/base/address_list.h ('k') | net/base/address_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/address_list.cc
diff --git a/net/base/address_list.cc b/net/base/address_list.cc
index 5442687f90f2c45fb37a78b84d453564809d3ed3..3c74f5da230359f81bddea4ca17f83425426783e 100644
--- a/net/base/address_list.cc
+++ b/net/base/address_list.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -112,7 +112,7 @@ AddressList& AddressList::operator=(const AddressList& addresslist) {
// static
AddressList AddressList::CreateFromIPAddressList(
const IPAddressList& addresses,
- uint16 port) {
+ const std::string& canonical_name) {
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));
}
« no previous file with comments | « net/base/address_list.h ('k') | net/base/address_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698