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

Unified Diff: net/tools/hresolv/hresolv.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/mock_host_resolver.cc ('k') | net/url_request/url_request_view_net_internals_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/hresolv/hresolv.cc
===================================================================
--- net/tools/hresolv/hresolv.cc (revision 34231)
+++ net/tools/hresolv/hresolv.cc (working copy)
@@ -446,8 +446,13 @@
}
}
+ net::HostCache* cache = new net::HostCache(
+ options.cache_size,
+ base::TimeDelta::FromMilliseconds(options.cache_ttl),
+ base::TimeDelta::FromSeconds(0));
+
scoped_refptr<net::HostResolver> host_resolver(
- new net::HostResolverImpl(NULL, options.cache_size, options.cache_ttl));
+ new net::HostResolverImpl(NULL, cache));
ResolverInvoker invoker(host_resolver.get());
invoker.ResolveAll(hosts_and_times, options.async);
« no previous file with comments | « net/base/mock_host_resolver.cc ('k') | net/url_request/url_request_view_net_internals_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698