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

Unified Diff: net/http/http_cache.cc

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/http_cache.cc
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 796aeea501414bdacb9efa9aecd625a6702a85aa..94511a5e69b2ef8b8d48f359154f8e7e1ff2ee1b 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -839,33 +839,6 @@ int HttpCache::AddTransactionToEntry(ActiveEntry* entry, Transaction* trans) {
return OK;
}
-void HttpCache::DoneWithEntry(ActiveEntry* entry, Transaction* trans,
- bool cancel) {
- // If we already posted a task to move on to the next transaction and this was
- // the writer, there is nothing to cancel.
- if (entry->will_process_pending_queue && entry->readers.empty())
rvargas (doing something else) 2015/08/19 23:46:37 I worry about removing this method. This logic sh
- return;
-
- if (entry->writer) {
- DCHECK(trans == entry->writer);
-
- // Assume there was a failure.
- bool success = false;
- if (cancel) {
- DCHECK(entry->disk_entry);
- // This is a successful operation in the sense that we want to keep the
- // entry.
- success = trans->AddTruncatedFlag();
- // The previous operation may have deleted the entry.
- if (!trans->entry())
- return;
- }
- DoneWritingToEntry(entry, success);
- } else {
- DoneReadingFromEntry(entry, trans);
- }
-}
-
void HttpCache::DoneWritingToEntry(ActiveEntry* entry, bool success) {
DCHECK(entry->readers.empty());

Powered by Google App Engine
This is Rietveld 408576698