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

Unified Diff: net/base/host_resolver_impl.cc

Issue 1566012: HostResolver supports optional CNAME lookups. (Closed)
Patch Set: Added CNAME details to about:net-internals Created 10 years, 8 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/host_resolver.h ('k') | net/base/host_resolver_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 44bbe418d71060e3c9a007da6b57f54cffc7da52..b8d42154669d2dc7681a8d87908bd20725b84e67 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -60,13 +60,16 @@ HostResolver* CreateSystemHostResolver(
static int ResolveAddrInfo(HostResolverProc* resolver_proc,
const std::string& host,
AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
AddressList* out) {
if (resolver_proc) {
// Use the custom procedure.
- return resolver_proc->Resolve(host, address_family, out);
+ return resolver_proc->Resolve(host, address_family,
+ host_resolver_flags, out);
} else {
// Use the system procedure (getaddrinfo).
- return SystemHostResolverProc(host, address_family, out);
+ return SystemHostResolverProc(host, address_family,
+ host_resolver_flags, out);
}
}
@@ -323,6 +326,7 @@ class HostResolverImpl::Job
error_ = ResolveAddrInfo(resolver_proc_,
key_.hostname,
key_.address_family,
+ key_.host_resolver_flags,
&results_);
if (requests_trace_) {
@@ -743,7 +747,8 @@ int HostResolverImpl::Resolve(const RequestInfo& info,
if (!callback) {
AddressList addrlist;
int error = ResolveAddrInfo(
- effective_resolver_proc(), key.hostname, key.address_family, &addrlist);
+ effective_resolver_proc(), key.hostname, key.address_family,
+ key.host_resolver_flags, &addrlist);
if (error == OK) {
addrlist.SetPort(info.port());
*addresses = addrlist;
@@ -1151,7 +1156,8 @@ HostResolverImpl::Key HostResolverImpl::GetEffectiveKeyForRequest(
AddressFamily effective_address_family = info.address_family();
if (effective_address_family == ADDRESS_FAMILY_UNSPECIFIED)
effective_address_family = default_address_family_;
- return Key(info.hostname(), effective_address_family);
+ return Key(info.hostname(), effective_address_family,
+ info.host_resolver_flags());
}
HostResolverImpl::Job* HostResolverImpl::CreateAndStartJob(Request* req) {
« no previous file with comments | « net/base/host_resolver.h ('k') | net/base/host_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698