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.cc

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.cc
diff --git a/net/base/host_cache.cc b/net/base/host_cache.cc
index f94b6869d76bf4e0b1f76f6117ded61774c93c9f..ec35f78f41805856536762885b5b50d3de9023c5 100644
--- a/net/base/host_cache.cc
+++ b/net/base/host_cache.cc
@@ -37,16 +37,16 @@ const HostCache::Entry* HostCache::Lookup(const Key& key,
return entries_.Get(key, now);
}
-void HostCache::Set(const Key& key,
- int error,
- const AddressList& addrlist,
- base::TimeTicks now,
- base::TimeDelta ttl) {
+HostCache::Entry* HostCache::Set(const Key& key,
+ int error,
+ const AddressList& addrlist,
+ base::TimeTicks now,
+ base::TimeDelta ttl) {
DCHECK(CalledOnValidThread());
if (caching_is_disabled())
- return;
+ return NULL;
- entries_.Put(key, Entry(error, addrlist), now, now + ttl);
+ return entries_.Put(key, Entry(error, addrlist), now, now + ttl);
}
void HostCache::clear() {

Powered by Google App Engine
This is Rietveld 408576698