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

Unified Diff: net/http/http_cache_transaction.cc

Issue 2671793002: Correct handling of ERR_CACHE_LOCK_TIMEOUT for read only transactions. (Closed)
Patch Set: Feedback addressed. Created 3 years, 10 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.cc ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 24002d75215d56bcc5081c22af3d4369806159e8..0e557c05b2f84c232c36291fde0ee00803538927 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1160,6 +1160,9 @@ int HttpCache::Transaction::DoAddToEntryComplete(int result) {
}
if (result == ERR_CACHE_LOCK_TIMEOUT) {
+ if (mode_ == READ)
+ return ERR_CACHE_MISS;
+
// The cache is busy, bypass it for this transaction.
mode_ = NONE;
next_state_ = STATE_SEND_REQUEST;
« no previous file with comments | « net/http/http_cache.cc ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698