Index: net/dns/host_cache.cc |
diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc |
index 0e6ff15cd5dabfb0224726222b85ce66fcaeda97..ea6c817f4348245c2c5dd0cf1bb60d7719d26383 100644 |
--- a/net/dns/host_cache.cc |
+++ b/net/dns/host_cache.cc |
@@ -14,18 +14,15 @@ namespace net { |
//----------------------------------------------------------------------------- |
-HostCache::Entry::Entry(int error, const AddressList& addrlist, |
+HostCache::Entry::Entry(int error, |
+ const AddressList& addrlist, |
base::TimeDelta ttl) |
- : error(error), |
- addrlist(addrlist), |
- ttl(ttl) { |
+ : error(error), addrlist(addrlist), ttl(ttl) { |
DCHECK(ttl >= base::TimeDelta()); |
} |
HostCache::Entry::Entry(int error, const AddressList& addrlist) |
- : error(error), |
- addrlist(addrlist), |
- ttl(base::TimeDelta::FromSeconds(-1)) { |
+ : error(error), addrlist(addrlist), ttl(base::TimeDelta::FromSeconds(-1)) { |
} |
HostCache::Entry::~Entry() { |
@@ -33,15 +30,13 @@ HostCache::Entry::~Entry() { |
//----------------------------------------------------------------------------- |
-HostCache::HostCache(size_t max_entries) |
- : entries_(max_entries) { |
+HostCache::HostCache(size_t max_entries) : entries_(max_entries) { |
} |
HostCache::~HostCache() { |
} |
-const HostCache::Entry* HostCache::Lookup(const Key& key, |
- base::TimeTicks now) { |
+const HostCache::Entry* HostCache::Lookup(const Key& key, base::TimeTicks now) { |
DCHECK(CalledOnValidThread()); |
if (caching_is_disabled()) |
return NULL; |
@@ -83,7 +78,7 @@ const HostCache::EntryMap& HostCache::entries() const { |
// static |
scoped_ptr<HostCache> HostCache::CreateDefaultCache() { |
- // Cache capacity is determined by the field trial. |
+// Cache capacity is determined by the field trial. |
#if defined(ENABLE_BUILT_IN_DNS) |
const size_t kDefaultMaxEntries = 1000; |
#else |
@@ -98,24 +93,32 @@ scoped_ptr<HostCache> HostCache::CreateDefaultCache() { |
return make_scoped_ptr(new HostCache(max_entries)); |
} |
-void HostCache::EvictionHandler::Handle( |
- const Key& key, |
- const Entry& entry, |
- const base::TimeTicks& expiration, |
- const base::TimeTicks& now, |
- bool on_get) const { |
+void HostCache::EvictionHandler::Handle(const Key& key, |
+ const Entry& entry, |
+ const base::TimeTicks& expiration, |
+ const base::TimeTicks& now, |
+ bool on_get) const { |
if (on_get) { |
DCHECK(now >= expiration); |
- UMA_HISTOGRAM_CUSTOM_TIMES("DNS.CacheExpiredOnGet", now - expiration, |
- base::TimeDelta::FromSeconds(1), base::TimeDelta::FromDays(1), 100); |
+ UMA_HISTOGRAM_CUSTOM_TIMES("DNS.CacheExpiredOnGet", |
+ now - expiration, |
+ base::TimeDelta::FromSeconds(1), |
+ base::TimeDelta::FromDays(1), |
+ 100); |
return; |
} |
if (expiration > now) { |
- UMA_HISTOGRAM_CUSTOM_TIMES("DNS.CacheEvicted", expiration - now, |
- base::TimeDelta::FromSeconds(1), base::TimeDelta::FromDays(1), 100); |
+ UMA_HISTOGRAM_CUSTOM_TIMES("DNS.CacheEvicted", |
+ expiration - now, |
+ base::TimeDelta::FromSeconds(1), |
+ base::TimeDelta::FromDays(1), |
+ 100); |
} else { |
- UMA_HISTOGRAM_CUSTOM_TIMES("DNS.CacheExpired", now - expiration, |
- base::TimeDelta::FromSeconds(1), base::TimeDelta::FromDays(1), 100); |
+ UMA_HISTOGRAM_CUSTOM_TIMES("DNS.CacheExpired", |
+ now - expiration, |
+ base::TimeDelta::FromSeconds(1), |
+ base::TimeDelta::FromDays(1), |
+ 100); |
} |
} |