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

Unified Diff: net/http/http_cache_transaction.h

Issue 2774603003: Doom and create new entry when validation is not a match (Closed)
Patch Set: Rebased with parent branch Created 3 years, 8 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_transaction.h
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index 6811dd44d9c6028b56eac5f612e031ecff1e1547..f2bc435e65a767abd5306c312a17f986b008c217 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -198,6 +198,7 @@ class HttpCache::Transaction : public HttpTransaction {
STATE_CREATE_ENTRY_COMPLETE,
STATE_ADD_TO_ENTRY,
STATE_ADD_TO_ENTRY_COMPLETE,
+ STATE_DONE_HEADERS_ADD_TO_ENTRY_COMPLETE,
Randy Smith (Not in Mondays) 2017/04/27 17:47:12 I'm not completely happy with the "done headers" n
shivanisha 2017/05/31 15:51:47 I am inclined to keep it because it is in line wit
STATE_CACHE_READ_RESPONSE,
STATE_CACHE_READ_RESPONSE_COMPLETE,
STATE_TOGGLE_UNUSED_SINCE_PREFETCH,
@@ -269,6 +270,7 @@ class HttpCache::Transaction : public HttpTransaction {
int DoCreateEntryComplete(int result);
int DoAddToEntry();
int DoAddToEntryComplete(int result);
+ int DoDoneHeadersAddToEntryComplete(int result);
int DoCacheReadResponse();
int DoCacheReadResponseComplete(int result);
int DoCacheToggleUnusedSincePrefetch();
@@ -480,6 +482,9 @@ class HttpCache::Transaction : public HttpTransaction {
bool handling_206_; // We must deal with this 206 response.
bool cache_pending_; // We are waiting for the HttpCache.
bool done_reading_; // All available data was read.
+ // Headers have been received from the network and it's not a match with the
+ // existing entry.
+ bool done_headers_create_new_entry_;
bool vary_mismatch_; // The request doesn't match the stored vary data.
bool couldnt_conditionalize_request_;
bool bypass_lock_for_test_; // A test is exercising the cache lock.

Powered by Google App Engine
This is Rietveld 408576698