summaryrefslogtreecommitdiffstats
path: root/net/base/host_resolver_impl_unittest.cc
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 15:35:13 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 15:35:13 +0000
commit5ea28dea56c771da6bdf7471c14844332129f718 (patch)
treeb474c2f97f021b431e9fee2a7df094e68c6ee0eb /net/base/host_resolver_impl_unittest.cc
parent0dc72bbeb04070039490e39c43f796c69601a796 (diff)
downloadchromium_src-5ea28dea56c771da6bdf7471c14844332129f718.zip
chromium_src-5ea28dea56c771da6bdf7471c14844332129f718.tar.gz
chromium_src-5ea28dea56c771da6bdf7471c14844332129f718.tar.bz2
HostResolver now adds AI_CANONNAME to the hint flags if a requester needs the information.
Requests which want the canonical name should be treated differently from requests that do not for the same host in both the HostCache as well as in the HostResolver when combining multiple outstanding requests into a job. The motivation for this is that Kerberos SPN's for a web server are typically generated using the canonical name of the server rather than a DNS alias (both Firefox and IE have this behavior). (note: I had to revert http://codereview.chromium.org/1566012/show because net_unittests were crashing/hanging on the main buildbot, even though they weren't on the trybots. Trying to figure out why). BUG=29862 TEST=net_unittests Review URL: http://codereview.chromium.org/1593015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver_impl_unittest.cc')
-rw-r--r--net/base/host_resolver_impl_unittest.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/base/host_resolver_impl_unittest.cc b/net/base/host_resolver_impl_unittest.cc
index e439491..e9a721c 100644
--- a/net/base/host_resolver_impl_unittest.cc
+++ b/net/base/host_resolver_impl_unittest.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.
@@ -90,13 +90,15 @@ class CapturingHostResolverProc : public HostResolverProc {
virtual int Resolve(const std::string& hostname,
AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
AddressList* addrlist) {
event_.Wait();
{
AutoLock l(lock_);
capture_list_.push_back(CaptureEntry(hostname, address_family));
}
- return ResolveUsingPrevious(hostname, address_family, addrlist);
+ return ResolveUsingPrevious(hostname, address_family,
+ host_resolver_flags, addrlist);
}
CaptureList GetCaptureList() const {
@@ -134,6 +136,7 @@ class EchoingHostResolverProc : public HostResolverProc {
virtual int Resolve(const std::string& hostname,
AddressFamily address_family,
+ HostResolverFlags host_resolver_flags,
AddressList* addrlist) {
// Encode the request's hostname and address_family in the output address.
std::string ip_literal = StringPrintf("192.%d.%d.%d",
@@ -143,6 +146,7 @@ class EchoingHostResolverProc : public HostResolverProc {
return SystemHostResolverProc(ip_literal,
ADDRESS_FAMILY_UNSPECIFIED,
+ host_resolver_flags,
addrlist);
}
};
@@ -1459,6 +1463,8 @@ TEST_F(HostResolverImplTest, SetDefaultAddressFamily_Synchronous) {
EXPECT_EQ("192.1.98.1", NetAddressToString(addrlist[3].head()));
}
+// TODO(cbentzel): Test a mix of requests with different HostResolverFlags.
+
} // namespace
} // namespace net