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

Unified Diff: net/http/http_cache_transaction.h

Issue 793823002: Let prefetched resources skip cache revalidation once for a short duration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from PS2 Created 6 years 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 0b4792bd116563c3dea02e2022e766865084d33e..028b1d2b3791db911a3ef2a0d4691c683dda95f3 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -181,6 +181,8 @@ class HttpCache::Transaction : public HttpTransaction {
STATE_PARTIAL_HEADERS_RECEIVED,
STATE_CACHE_READ_RESPONSE,
STATE_CACHE_READ_RESPONSE_COMPLETE,
+ STATE_TOGGLE_UNUSED_SINCE_PREFETCH,
+ STATE_TOGGLE_UNUSED_SINCE_PREFETCH_COMPLETE,
STATE_CACHE_WRITE_RESPONSE,
STATE_CACHE_WRITE_TRUNCATED_RESPONSE,
STATE_CACHE_WRITE_RESPONSE_COMPLETE,
@@ -252,6 +254,8 @@ class HttpCache::Transaction : public HttpTransaction {
int DoPartialHeadersReceived();
int DoCacheReadResponse();
int DoCacheReadResponseComplete(int result);
+ int DoCacheToggleUnusedSincePrefetch();
+ int DoCacheToggleUnusedSincePrefetchComplete(int result);
int DoCacheWriteResponse();
int DoCacheWriteTruncatedResponse();
int DoCacheWriteResponseComplete(int result);
@@ -373,6 +377,10 @@ class HttpCache::Transaction : public HttpTransaction {
// the control object (partial_).
void DoomPartialEntry(bool delete_object);
+ // Determines the next state to move to after reading a response from the
+ // cache based on the (mode_).
+ int DoCacheReadResponseCompleteContinuation();
+
// Performs the needed work after receiving data from the network, when
// working with range requests.
int DoPartialNetworkReadCompleted(int result);

Powered by Google App Engine
This is Rietveld 408576698