summaryrefslogtreecommitdiffstats
path: root/net/base/host_cache.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 20:35:02 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 20:35:02 +0000
commit60cf7c9ce8cc0b34e9a7768db0c2550eb7cf1e78 (patch)
treec9ce9e57f2966c0d063119dc2c0c98bf060f1cfb /net/base/host_cache.h
parent72732449c037ad35ea43b228105b7ff387d5cb31 (diff)
downloadchromium_src-60cf7c9ce8cc0b34e9a7768db0c2550eb7cf1e78.zip
chromium_src-60cf7c9ce8cc0b34e9a7768db0c2550eb7cf1e78.tar.gz
chromium_src-60cf7c9ce8cc0b34e9a7768db0c2550eb7cf1e78.tar.bz2
Fix a bad comparator. This caused lookups in std::map to be wrong.
BUG=25823 TEST=HostCacheTest.KeyComparator Review URL: http://codereview.chromium.org/338023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_cache.h')
-rw-r--r--net/base/host_cache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/base/host_cache.h b/net/base/host_cache.h
index 538f7ef..b36af35 100644
--- a/net/base/host_cache.h
+++ b/net/base/host_cache.h
@@ -42,9 +42,9 @@ class HostCache {
}
bool operator<(const Key& other) const {
- if (address_family < other.address_family)
- return true;
- return hostname < other.hostname;
+ if (address_family == other.address_family)
+ return hostname < other.hostname;
+ return address_family < other.address_family;
}
std::string hostname;