| Index: net/base/host_cache.h
|
| ===================================================================
|
| --- net/base/host_cache.h (revision 34231)
|
| +++ net/base/host_cache.h (working copy)
|
| @@ -57,9 +57,12 @@
|
|
|
| typedef std::map<Key, scoped_refptr<Entry> > EntryMap;
|
|
|
| - // Constructs a HostCache whose entries are valid for |cache_duration_ms|
|
| - // milliseconds. The cache will store up to |max_entries|.
|
| - HostCache(size_t max_entries, size_t cache_duration_ms);
|
| + // Constructs a HostCache that caches successful host resolves for
|
| + // |success_entry_ttl| time, and failed host resolves for
|
| + // |failure_entry_ttl|. The cache will store up to |max_entries|.
|
| + HostCache(size_t max_entries,
|
| + base::TimeDelta success_entry_ttl,
|
| + base::TimeDelta failure_entry_ttl);
|
|
|
| ~HostCache();
|
|
|
| @@ -90,10 +93,14 @@
|
| return max_entries_;
|
| }
|
|
|
| - size_t cache_duration_ms() const {
|
| - return cache_duration_ms_;
|
| + base::TimeDelta success_entry_ttl() const {
|
| + return success_entry_ttl_;
|
| }
|
|
|
| + base::TimeDelta failure_entry_ttl() const {
|
| + return failure_entry_ttl_;
|
| + }
|
| +
|
| // Note that this map may contain expired entries.
|
| const EntryMap& entries() const {
|
| return entries_;
|
| @@ -113,8 +120,9 @@
|
| // Bound on total size of the cache.
|
| size_t max_entries_;
|
|
|
| - // Time to live for cache entries in milliseconds.
|
| - size_t cache_duration_ms_;
|
| + // Time to live for cache entries.
|
| + base::TimeDelta success_entry_ttl_;
|
| + base::TimeDelta failure_entry_ttl_;
|
|
|
| // Map from hostname (presumably in lowercase canonicalized format) to
|
| // a resolved result entry.
|
|
|