summaryrefslogtreecommitdiffstats
path: root/net/base/host_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/host_cache.cc')
-rw-r--r--net/base/host_cache.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/base/host_cache.cc b/net/base/host_cache.cc
index 53af5b4..fbe2a7e 100644
--- a/net/base/host_cache.cc
+++ b/net/base/host_cache.cc
@@ -29,12 +29,12 @@ HostCache::HostCache(size_t max_entries, size_t cache_duration_ms)
HostCache::~HostCache() {
}
-const HostCache::Entry* HostCache::Lookup(const std::string& hostname,
+const HostCache::Entry* HostCache::Lookup(const Key& key,
base::TimeTicks now) const {
if (caching_is_disabled())
return NULL;
- EntryMap::const_iterator it = entries_.find(hostname);
+ EntryMap::const_iterator it = entries_.find(key);
if (it == entries_.end())
return NULL; // Not found.
@@ -45,7 +45,7 @@ const HostCache::Entry* HostCache::Lookup(const std::string& hostname,
return NULL;
}
-HostCache::Entry* HostCache::Set(const std::string& hostname,
+HostCache::Entry* HostCache::Set(const Key& key,
int error,
const AddressList addrlist,
base::TimeTicks now) {
@@ -55,7 +55,7 @@ HostCache::Entry* HostCache::Set(const std::string& hostname,
base::TimeTicks expiration = now +
base::TimeDelta::FromMilliseconds(cache_duration_ms_);
- scoped_refptr<Entry>& entry = entries_[hostname];
+ scoped_refptr<Entry>& entry = entries_[key];
if (!entry) {
// Entry didn't exist, creating one now.
Entry* ptr = new Entry(error, addrlist, expiration);