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

Side by Side Diff: net/base/host_cache.cc

Issue 10948048: [net] Increase HostCache size to 1000 entries on CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/host_cache.h" 5 #include "net/base/host_cache.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 // Note that this map may contain expired entries. 67 // Note that this map may contain expired entries.
68 const HostCache::EntryMap& HostCache::entries() const { 68 const HostCache::EntryMap& HostCache::entries() const {
69 DCHECK(CalledOnValidThread()); 69 DCHECK(CalledOnValidThread());
70 return entries_; 70 return entries_;
71 } 71 }
72 72
73 // static 73 // static
74 HostCache* HostCache::CreateDefaultCache() { 74 HostCache* HostCache::CreateDefaultCache() {
75 #if defined(OS_CHROMEOS)
76 // Increase HostCache size for the duration of the async DNS field trial.
77 // http://crbug.com/143454
78 // TODO(szym): Determine the best size. http://crbug.com/114277
79 static const size_t kMaxHostCacheEntries = 1000;
80 #else
75 static const size_t kMaxHostCacheEntries = 100; 81 static const size_t kMaxHostCacheEntries = 100;
jar (doing other things) 2012/09/20 17:24:34 nit: static on these data items seems like a waste
82 #endif
76 return new HostCache(kMaxHostCacheEntries); 83 return new HostCache(kMaxHostCacheEntries);
77 } 84 }
78 85
79 } // namespace net 86 } // namespace net
OLDNEW
« 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