Skip to content

Commit

Permalink
[net] Set default HostCache size to 1000 entries.
Browse files Browse the repository at this point in the history
BUG=114277


Review URL: https://chromiumcodereview.appspot.com/11775008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176410 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
szym@chromium.org committed Jan 11, 2013
1 parent f7ae1f7 commit 3086896
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/base/host_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 3086896

Please sign in to comment.