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

Unified Diff: net/base/mock_host_resolver.cc

Issue 464084: Cache failed DNS resolutions for 1 second.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Merge changes (to include API change in another file) Created 11 years 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 | « net/base/host_resolver_impl_unittest.cc ('k') | net/tools/hresolv/hresolv.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mock_host_resolver.cc
===================================================================
--- net/base/mock_host_resolver.cc (revision 34231)
+++ net/base/mock_host_resolver.cc (working copy)
@@ -93,10 +93,16 @@
proc = interceptor;
}
- int max_cache_entries = use_caching_ ? 100 : 0;
- int max_cache_age_ms = use_caching_ ? 60000 : 0;
+ HostCache* cache = NULL;
- impl_ = new HostResolverImpl(proc, max_cache_entries, max_cache_age_ms);
+ if (use_caching_) {
+ cache = new HostCache(
+ 100, // max entries.
+ base::TimeDelta::FromMinutes(1),
+ base::TimeDelta::FromSeconds(0));
+ }
+
+ impl_ = new HostResolverImpl(proc, cache);
}
//-----------------------------------------------------------------------------
« no previous file with comments | « net/base/host_resolver_impl_unittest.cc ('k') | net/tools/hresolv/hresolv.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698