summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-20 11:02:51 +0000
committerszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-20 11:02:51 +0000
commit2ac252812370479fd672b3631d131ad3c183b31a (patch)
tree4b072376dc21c60984b1b7be6edc1ceb332a47c1
parentb67c3eba5e87903750747468e63a02b67580e98e (diff)
downloadchromium_src-2ac252812370479fd672b3631d131ad3c183b31a.zip
chromium_src-2ac252812370479fd672b3631d131ad3c183b31a.tar.gz
chromium_src-2ac252812370479fd672b3631d131ad3c183b31a.tar.bz2
[net] Increase HostCache size to 1000 entries on CrOS.
The built-in async DNS client notoriously fills up the small (100-entry) cache. To even out the playfield for the field trial, drastically increase the size. This is a temporary measure before we can tune the size according to performance. BUG=114277 TEST=on CrOS, check HostCache size in chrome://net-internals/#dns Review URL: https://chromiumcodereview.appspot.com/10948048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157742 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/base/host_cache.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/base/host_cache.cc b/net/base/host_cache.cc
index ae0169c..f94b686 100644
--- a/net/base/host_cache.cc
+++ b/net/base/host_cache.cc
@@ -72,7 +72,14 @@ const HostCache::EntryMap& HostCache::entries() const {
// static
HostCache* HostCache::CreateDefaultCache() {
+#if defined(OS_CHROMEOS)
+ // Increase HostCache size for the duration of the async DNS field trial.
+ // http://crbug.com/143454
+ // TODO(szym): Determine the best size. http://crbug.com/114277
+ static const size_t kMaxHostCacheEntries = 1000;
+#else
static const size_t kMaxHostCacheEntries = 100;
+#endif
return new HostCache(kMaxHostCacheEntries);
}