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

Unified Diff: net/proxy/proxy_resolver_v8.cc

Issue 9197009: Adds custom ttl argument to HostCache::Set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 11 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/proxy/proxy_resolver_v8.cc
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index 92beb80c4588606749b2701a522d219726c1dd14..1fb2e2d364b6750c8e4d53f7267fc4062fabf29b 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -742,12 +742,10 @@ int ProxyResolverV8::GetProxyForURL(
// available to any of the javascript "bindings" that are subsequently invoked
// from the javascript.
//
- // In particular, we create a HostCache that is aggressive about caching
- // failed DNS resolves.
- HostCache host_cache(
- 50,
- base::TimeDelta::FromMinutes(5),
- base::TimeDelta::FromMinutes(5));
+ // In particular, we create a HostCache to aggressively cache failed DNS
+ // resolves.
+ const unsigned kMaxCacheEntries = 50;
+ HostCache host_cache(kMaxCacheEntries);
ProxyResolverRequestContext request_context(&net_log, &host_cache);
« net/base/host_resolver_impl.cc ('K') | « net/proxy/proxy_resolver_js_bindings_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698