Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: net/base/host_cache.h

Issue 9197009: Adds custom ttl argument to HostCache::Set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo change for when TTL == 0. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/host_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_cache.h
diff --git a/net/base/host_cache.h b/net/base/host_cache.h
index 62c07ab978f51ee76132809e70b16eacea79aa8b..394736c962d287f9cf576ad82dbc9137dab35149 100644
--- a/net/base/host_cache.h
+++ b/net/base/host_cache.h
@@ -88,8 +88,16 @@ class NET_EXPORT HostCache : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// Overwrites or creates an entry for |key|. Returns the pointer to the
// entry, or NULL on failure (fails if caching is disabled).
- // (|error|, |addrlist|) is the value to set, and |now| is the current
- // timestamp.
+ // (|error|, |addrlist|) is the value to set, |ttl| is the "time to live",
cbentzel 2012/01/13 01:06:14 How much work would it be to only allow this versi
szym 2012/01/14 16:30:54 (Excluding unittests) There are three calls to Hos
+ // and |now| is the current timestamp. If |ttl| is zero, the default,
+ // |success_entry_ttl| or |failure_entry_ttl| is used.
+ Entry* Set(const Key& key,
+ int error,
+ const AddressList& addrlist,
+ base::TimeDelta ttl,
+ base::TimeTicks now);
+
+ // Same as |Set(key, error, addrlist, TimeDelta(), now)|.
Entry* Set(const Key& key,
int error,
const AddressList& addrlist,
« no previous file with comments | « no previous file | net/base/host_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698