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

Unified Diff: net/base/host_cache.cc

Issue 11366201: [net] Fix parsing of HostCacheSize field trial group name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 1 month 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 fdfc334423d93c70243a90bdb69e5f64e1addea9..cd98c1dc8fe398a5bc40eebca7fa76372e108b84 100644
--- a/net/base/host_cache.cc
+++ b/net/base/host_cache.cc
@@ -86,10 +86,10 @@ scoped_ptr<HostCache> HostCache::CreateDefaultCache() {
// Cache capacity is determined by the field trial.
const size_t kSaneMaxEntries = 1 << 20;
size_t max_entries = 0;
- if (!base::StringToSizeT(base::FieldTrialList::FindFullName("HostCacheSize"),
- &max_entries) || max_entries > kSaneMaxEntries) {
+ base::StringToSizeT(base::FieldTrialList::FindFullName("HostCacheSize"),
+ &max_entries);
+ if ((max_entries == 0) || (max_entries > kSaneMaxEntries))
max_entries = 100;
- }
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