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

Unified Diff: net/base/host_cache.cc

Issue 11775008: [net] Set default HostCache size to 1000 entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restrict increase to platforms which support built-in DNS Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_cache.cc
diff --git a/net/base/host_cache.cc b/net/base/host_cache.cc
index cd98c1dc8fe398a5bc40eebca7fa76372e108b84..32f8c44a19180e2dbb9699bc3bf81cf7ad7f4ec3 100644
--- a/net/base/host_cache.cc
+++ b/net/base/host_cache.cc
@@ -84,12 +84,17 @@ const HostCache::EntryMap& HostCache::entries() const {
// static
scoped_ptr<HostCache> HostCache::CreateDefaultCache() {
// Cache capacity is determined by the field trial.
+#if defined(ENABLE_BUILT_IN_DNS)
+ const size_t kDefaultMaxEntries = 1000;
+#else
+ const size_t kDefaultMaxEntries = 100;
+#endif
const size_t kSaneMaxEntries = 1 << 20;
size_t max_entries = 0;
base::StringToSizeT(base::FieldTrialList::FindFullName("HostCacheSize"),
&max_entries);
if ((max_entries == 0) || (max_entries > kSaneMaxEntries))
- max_entries = 100;
+ max_entries = kDefaultMaxEntries;
return make_scoped_ptr(new HostCache(max_entries));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698