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

Unified Diff: net/http/mock_http_cache.cc

Issue 2774603003: Doom and create new entry when validation is not a match (Closed)
Patch Set: Rebased with refs/heads/master@{#484325} Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/mock_http_cache.cc
diff --git a/net/http/mock_http_cache.cc b/net/http/mock_http_cache.cc
index 5363d3af29dd0067ce58b9cd9489b40f2b545b16..514cc4208f82c79b3cafb876ef027716fd69b09f 100644
--- a/net/http/mock_http_cache.cc
+++ b/net/http/mock_http_cache.cc
@@ -370,10 +370,13 @@ bool MockDiskEntry::ignore_callbacks_ = false;
//-----------------------------------------------------------------------------
MockDiskCache::MockDiskCache()
- : open_count_(0), create_count_(0), fail_requests_(false),
- soft_failures_(false), double_create_check_(true),
- fail_sparse_requests_(false) {
-}
+ : open_count_(0),
+ create_count_(0),
+ doomed_count_(0),
+ fail_requests_(false),
+ soft_failures_(false),
+ double_create_check_(true),
+ fail_sparse_requests_(false) {}
MockDiskCache::~MockDiskCache() {
ReleaseAll();
@@ -468,6 +471,7 @@ int MockDiskCache::DoomEntry(const std::string& key,
if (it != entries_.end()) {
it->second->Release();
entries_.erase(it);
+ doomed_count_++;
}
if (GetTestModeForEntry(key) & TEST_MODE_SYNC_CACHE_START)
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698