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

Unified Diff: net/http/mock_http_cache.h

Issue 1230113012: [net] Better StopCaching() handling for HttpCache::Transaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: net/http/mock_http_cache.h
diff --git a/net/http/mock_http_cache.h b/net/http/mock_http_cache.h
index 632bb3e63c16996290e5ed945c6d7f7909eea5c0..57f43a9a6f1e49b78c2958d619dd7cda14185ac0 100644
--- a/net/http/mock_http_cache.h
+++ b/net/http/mock_http_cache.h
@@ -137,6 +137,10 @@ class MockDiskCache : public disk_cache::Backend {
// Returns number of times a cache entry was successfully created.
int create_count() const { return create_count_; }
+ // Resets open_count() and create_count(). Calling this is recommended to
+ // reset the counts after test setup.
+ void ResetCounts();
+
// Fail any subsequent CreateEntry and OpenEntry.
void set_fail_requests() { fail_requests_ = true; }

Powered by Google App Engine
This is Rietveld 408576698