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

Unified Diff: net/http/http_cache.h

Issue 345643003: Http cache: Implement a timeout for the cache lock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add constant Created 6 years, 6 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/base/net_error_list.h ('k') | net/http/http_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 732a9c09c75b03e5664c0b1f5f73e7a9388a547b..752b98a6715b0f9c66030d4a9e143fb90d9b522e 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -187,6 +187,12 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
// Initializes the Infinite Cache, if selected by the field trial.
void InitializeInfiniteCache(const base::FilePath& path);
+ // Causes all transactions created after this point to effectively bypass
+ // the cache lock whenever there is lock contention.
+ void BypassLockForTest() {
+ bypass_lock_for_test_ = true;
+ }
+
// HttpTransactionFactory implementation:
virtual int CreateTransaction(RequestPriority priority,
scoped_ptr<HttpTransaction>* trans) OVERRIDE;
@@ -389,6 +395,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
// Used when lazily constructing the disk_cache_.
scoped_ptr<BackendFactory> backend_factory_;
bool building_backend_;
+ bool bypass_lock_for_test_;
Mode mode_;
« no previous file with comments | « net/base/net_error_list.h ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698