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

Unified Diff: net/base/host_cache.h

Issue 11065052: [net] Add AsyncDNS.TTL histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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
Index: net/base/host_cache.h
diff --git a/net/base/host_cache.h b/net/base/host_cache.h
index 7aff49c1ba16dc85cd145c9298ed2314e3ad953e..c700c9cd9c9351b915da2815cab0aac654c3f776 100644
--- a/net/base/host_cache.h
+++ b/net/base/host_cache.h
@@ -29,6 +29,7 @@ class NET_EXPORT HostCache : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// The resolve results for this entry.
int error;
AddressList addrlist;
+ base::TimeDelta original_ttl;
};
struct Key {
@@ -68,12 +69,12 @@ class NET_EXPORT HostCache : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// Overwrites or creates an entry for |key|.
// (|error|, |addrlist|) is the value to set, |now| is the current time
- // |ttl| is the "time to live".
- void Set(const Key& key,
- int error,
- const AddressList& addrlist,
- base::TimeTicks now,
- base::TimeDelta ttl);
+ // |ttl| is the "time to live". Returns a pointer to the created entry.
+ Entry* Set(const Key& key,
+ int error,
+ const AddressList& addrlist,
+ base::TimeTicks now,
+ base::TimeDelta ttl);
cbentzel 2012/10/11 18:27:30 Could this just take a base::TimeDelta original_tt
szym 2012/10/11 18:33:21 The rationale was that changing the signature of S
// Empties the cache
void clear();

Powered by Google App Engine
This is Rietveld 408576698