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

Unified Diff: net/dns/host_cache.cc

Issue 2083643003: DNS: Let requests specify a callback for future cache hits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/dns/host_cache.cc
diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc
index ee3d96215f35fc61c5c934bfe07f08e073345ced..7556e7eee478408afd182eef19360fafc3681ffe 100644
--- a/net/dns/host_cache.cc
+++ b/net/dns/host_cache.cc
@@ -234,6 +234,8 @@ void HostCache::EvictOneEntry(base::TimeTicks now) {
oldest_it = it;
}
+ if (!eviction_callback_.is_null())
+ eviction_callback_.Run(oldest_it->first, oldest_it->second);
RecordErase(ERASE_EVICT, now, oldest_it->second);
entries_.erase(oldest_it);
}
« no previous file with comments | « net/dns/host_cache.h ('k') | net/dns/host_cache_unittest.cc » ('j') | net/dns/host_resolver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698