summaryrefslogtreecommitdiffstats
path: root/net/base/host_cache.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 14:41:40 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 14:41:40 +0000
commit69e6633595327cfc99037eedec0f64821cafc569 (patch)
tree25fc7b2e9db997e018dd127bbab18a6fd71fe0a9 /net/base/host_cache.h
parentc3d6b25093e1c915364e72f9c008e81972419f04 (diff)
downloadchromium_src-69e6633595327cfc99037eedec0f64821cafc569.zip
chromium_src-69e6633595327cfc99037eedec0f64821cafc569.tar.gz
chromium_src-69e6633595327cfc99037eedec0f64821cafc569.tar.bz2
Revert 43826 - 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). BUG=29862 TEST=net_unittests Review URL: http://codereview.chromium.org/1566012 TBR=cbentzel@chromium.org Review URL: http://codereview.chromium.org/1629005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_cache.h')
-rw-r--r--net/base/host_cache.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/net/base/host_cache.h b/net/base/host_cache.h
index dd31871..c13c6a0 100644
--- a/net/base/host_cache.h
+++ b/net/base/host_cache.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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.
@@ -37,29 +37,22 @@ class HostCache {
};
struct Key {
- Key(const std::string& hostname, AddressFamily address_family,
- HostResolverFlags host_resolver_flags)
- : hostname(hostname),
- address_family(address_family),
- host_resolver_flags(host_resolver_flags) {}
+ Key(const std::string& hostname, AddressFamily address_family)
+ : hostname(hostname), address_family(address_family) {}
bool operator==(const Key& other) const {
- return (other.address_family == address_family &&
- other.host_resolver_flags == host_resolver_flags &&
- other.hostname == hostname);
+ return other.hostname == hostname &&
+ other.address_family == address_family;
}
bool operator<(const Key& other) const {
- if (address_family != other.address_family)
- return address_family < other.address_family;
- if (host_resolver_flags != other.host_resolver_flags)
- return host_resolver_flags < other.host_resolver_flags;
- return hostname < other.hostname;
+ if (address_family == other.address_family)
+ return hostname < other.hostname;
+ return address_family < other.address_family;
}
std::string hostname;
AddressFamily address_family;
- HostResolverFlags host_resolver_flags;
};
typedef std::map<Key, scoped_refptr<Entry> > EntryMap;