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

Unified Diff: net/http/http_cache.h

Issue 2886483002: Adds a new class HttpCache::Writers for multiple cache transactions reading from the network. (Closed)
Patch Set: Feedback addressed. Created 3 years, 5 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.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index e420c7244204874988b4908149bf51a2bd8697a3..d3a0a4b0853a0ca80abf848c04135cf11930da15 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -246,6 +246,9 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory {
class QuicServerInfoFactoryAdaptor;
class Transaction;
class WorkItem;
+ class Writers;
+ friend class WritersTest; // To access ActiveEntry in the test class.
+ friend class MockHttpCacheTransaction;
friend class Transaction;
friend class ViewCacheHelper;
struct PendingOp; // Info for an entry under construction.
@@ -424,6 +427,11 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory {
// Called when the transaction has finished reading from this entry.
void DoneReadingFromEntry(ActiveEntry* entry, Transaction* transaction);
+ // Called when the transaction has received a non-matching response to
+ // validation and it's not the transaction responsible for writing the
+ // response body.
+ void DoomEntryValidationNoMatch(ActiveEntry* entry);
+
// Removes and returns all queued transactions in |entry| in FIFO order. This
// includes transactions that have completed the headers phase and those that
// have not been added to the entry yet in that order. |list| is the output
@@ -431,8 +439,7 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory {
void RemoveAllQueuedTransactions(ActiveEntry* entry, TransactionList* list);
// Processes either writer's failure to write response body or
- // headers_transactions's failure to write headers. Also invoked when headers
- // transaction's validation result is not a match.
+ // headers_transactions's failure to write headers.
void ProcessEntryFailure(ActiveEntry* entry, Transaction* transaction);
// Restarts headers_transaction and done_headers_queue transactions.
« no previous file with comments | « net/BUILD.gn ('k') | net/http/http_cache.cc » ('j') | net/http/http_cache_transaction.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698