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

Unified Diff: net/http/http_cache_transaction.cc

Issue 181173003: Deactivate cache entry when caching is stopped. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | 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 15ad924df8f846599166ad663f6c01d3b3dbe94c..178fc180db5ac605adf647b608a8e270d98ce4b0 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -449,6 +449,9 @@ void HttpCache::Transaction::StopCaching() {
if (cache_.get() && entry_ && (mode_ & WRITE) && network_trans_.get() &&
!is_sparse_ && !range_requested_) {
mode_ = NONE;
+ // We need to deactivate the cache entry.
+ // Otherwise subsequent requests for this resource will fail.
+ cache_->DoomEntry(cache_key_, NULL);
}
}
« no previous file with comments | « no previous file | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698