Index: net/http/http_auth_cache.cc |
diff --git a/net/http/http_auth_cache.cc b/net/http/http_auth_cache.cc |
index d989830b2aa6f8df98105550f25bbd50da439fbe..9d03220727f27cb79e6e7db0828165e8bba930f6 100644 |
--- a/net/http/http_auth_cache.cc |
+++ b/net/http/http_auth_cache.cc |
@@ -51,8 +51,8 @@ void CheckOriginIsValid(const GURL& origin) { |
// Functor used by remove_if. |
struct IsEnclosedBy { |
- explicit IsEnclosedBy(const std::string& path) : path(path) { } |
- bool operator() (const std::string& x) const { |
+ explicit IsEnclosedBy(const std::string& path) : path(path) {} |
+ bool operator()(const std::string& x) const { |
return IsEnclosingPath(path, x); |
} |
const std::string& path; |
@@ -151,9 +151,9 @@ HttpAuthCache::Entry* HttpAuthCache::Add(const GURL& origin, |
if (entries_.size() >= kMaxNumRealmEntries) { |
LOG(WARNING) << "Num auth cache entries reached limit -- evicting"; |
UMA_HISTOGRAM_LONG_TIMES("Net.HttpAuthCacheAddEvictedCreation", |
- now - entries_.back().creation_time_); |
+ now - entries_.back().creation_time_); |
UMA_HISTOGRAM_LONG_TIMES("Net.HttpAuthCacheAddEvictedLastUse", |
- now - entries_.back().last_use_time_); |
+ now - entries_.back().last_use_time_); |
entries_.pop_back(); |
evicted = true; |
} |
@@ -189,8 +189,7 @@ void HttpAuthCache::Entry::UpdateStaleChallenge( |
} |
HttpAuthCache::Entry::Entry() |
- : scheme_(HttpAuth::AUTH_SCHEME_MAX), |
- nonce_count_(0) { |
+ : scheme_(HttpAuth::AUTH_SCHEME_MAX), nonce_count_(0) { |
} |
void HttpAuthCache::Entry::AddPath(const std::string& path) { |
@@ -217,8 +216,7 @@ void HttpAuthCache::Entry::AddPath(const std::string& path) { |
bool HttpAuthCache::Entry::HasEnclosingPath(const std::string& dir, |
size_t* path_len) { |
DCHECK(GetParentDirectory(dir) == dir); |
- for (PathList::const_iterator it = paths_.begin(); it != paths_.end(); |
- ++it) { |
+ for (PathList::const_iterator it = paths_.begin(); it != paths_.end(); ++it) { |
if (IsEnclosingPath(*it, dir)) { |
// No element of paths_ may enclose any other element. |
// Therefore this path is the tightest bound. Important because |
@@ -263,15 +261,20 @@ bool HttpAuthCache::UpdateStaleChallenge(const GURL& origin, |
void HttpAuthCache::UpdateAllFrom(const HttpAuthCache& other) { |
for (EntryList::const_iterator it = other.entries_.begin(); |
- it != other.entries_.end(); ++it) { |
+ it != other.entries_.end(); |
+ ++it) { |
// Add an Entry with one of the original entry's paths. |
DCHECK(it->paths_.size() > 0); |
- Entry* entry = Add(it->origin(), it->realm(), it->scheme(), |
- it->auth_challenge(), it->credentials(), |
+ Entry* entry = Add(it->origin(), |
+ it->realm(), |
+ it->scheme(), |
+ it->auth_challenge(), |
+ it->credentials(), |
it->paths_.back()); |
// Copy all other paths. |
for (Entry::PathList::const_reverse_iterator it2 = ++it->paths_.rbegin(); |
- it2 != it->paths_.rend(); ++it2) |
+ it2 != it->paths_.rend(); |
+ ++it2) |
entry->AddPath(*it2); |
// Copy nonce count (for digest authentication). |
entry->nonce_count_ = it->nonce_count_; |