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

Unified Diff: net/http/http_cache_transaction.h

Issue 464028: Http cache: Second pass to move the HttpCache::Transaction... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.h
===================================================================
--- net/http/http_cache_transaction.h (revision 33833)
+++ net/http/http_cache_transaction.h (working copy)
@@ -96,11 +96,11 @@
enum State {
STATE_NONE,
- STATE_START_REQUEST,
STATE_SEND_REQUEST,
STATE_SEND_REQUEST_COMPLETE,
STATE_NETWORK_READ,
STATE_NETWORK_READ_COMPLETE,
+ STATE_INIT_ENTRY,
STATE_OPEN_ENTRY,
STATE_OPEN_ENTRY_COMPLETE,
STATE_CREATE_ENTRY,
@@ -108,8 +108,8 @@
STATE_DOOM_ENTRY,
STATE_DOOM_ENTRY_COMPLETE,
STATE_ADD_TO_ENTRY,
- STATE_ADD_TO_ENTRY_COMPLETE,
STATE_ENTRY_AVAILABLE,
+ STATE_PARTIAL_CACHE_VALIDATION,
STATE_CACHE_READ_RESPONSE,
STATE_CACHE_READ_RESPONSE_COMPLETE,
STATE_CACHE_WRITE_RESPONSE,
@@ -132,11 +132,23 @@
// Runs the state transition loop.
int DoLoop(int result);
- // Each of these methods corresponds to a State value.
+ // Each of these methods corresponds to a State value. If there is an
+ // argument, the value corresponds to the return of the previous state or
+ // corresponding callback.
int DoSendRequest();
int DoSendRequestComplete(int result);
int DoNetworkRead();
int DoNetworkReadComplete(int result);
+ int DoInitEntry();
+ int DoOpenEntry();
+ int DoOpenEntryComplete();
+ int DoCreateEntry();
+ int DoCreateEntryComplete();
+ int DoDoomEntry();
+ int DoDoomEntryComplete();
+ int DoAddToEntry();
+ int DoEntryAvailable();
+ int DoPartialCacheValidation();
int DoCacheReadData();
int DoCacheReadDataComplete(int result);
int DoCacheQueryData();
@@ -165,11 +177,6 @@
// the validation of the rest of the entry. Returns a network error code.
int ValidateEntryHeadersAndContinue(bool byte_range_requested);
- // Performs the cache validation for the next chunk of data stored by the
- // cache. If this chunk is not currently stored, starts the network request
- // to fetch it. Returns a network error code.
- int ContinuePartialCacheValidation();
-
// Called to start requests which were given an "if-modified-since" or
// "if-none-match" validation header by the caller (NOT when the request was
// conditionalized internally in response to LOAD_VALIDATE_CACHE).
@@ -265,6 +272,7 @@
ValidationHeaders external_validation_;
base::WeakPtr<HttpCache> cache_;
HttpCache::ActiveEntry* entry_;
+ HttpCache::ActiveEntry* new_entry_;
scoped_ptr<HttpTransaction> network_trans_;
CompletionCallback* callback_; // Consumer's callback.
HttpResponseInfo response_;
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698