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

Unified Diff: net/http/mock_http_cache.h

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/http_cache_unittest.cc ('k') | net/http/mock_http_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/mock_http_cache.h
diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
index ca0730429f7b401e18987acdf31a3859991b62f0..d568c64db9a5d206a04973c2b82d37d289f97f30 100644
--- a/net/http/mock_http_cache.h
+++ b/net/http/mock_http_cache.h
@@ -144,6 +144,9 @@ class MockDiskCache : public disk_cache::Backend {
// Returns number of times a cache entry was successfully created.
int create_count() const { return create_count_; }
+ // Returns number of doomed entries.
+ int doomed_count() const { return doomed_count_; }
+
// Fail any subsequent CreateEntry and OpenEntry.
void set_fail_requests() { fail_requests_ = true; }
@@ -169,6 +172,7 @@ class MockDiskCache : public disk_cache::Backend {
EntryMap entries_;
int open_count_;
int create_count_;
+ int doomed_count_;
bool fail_requests_;
bool soft_failures_;
bool double_create_check_;
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/mock_http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698