summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache_transaction.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 21:06:24 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 21:06:24 +0000
commit7e6a4f39d228f64a9f666ea8ccbe88bcff3850d2 (patch)
treecdec59f4684bf672a94b37179a5352ab18bb0e58 /net/http/http_cache_transaction.h
parentc32f04146677ab69289f661de3236fda5791c953 (diff)
downloadchromium_src-7e6a4f39d228f64a9f666ea8ccbe88bcff3850d2.zip
chromium_src-7e6a4f39d228f64a9f666ea8ccbe88bcff3850d2.tar.gz
chromium_src-7e6a4f39d228f64a9f666ea8ccbe88bcff3850d2.tar.bz2
Http Cache: Eliminate EntryAvailable() and make the cache use
callbacks to notify the transaction about the completion of AddTransactionToEntry. BUG=26729 TEST=current tests. Review URL: http://codereview.chromium.org/593058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache_transaction.h')
-rw-r--r--net/http/http_cache_transaction.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index f417378..9608093 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -71,18 +71,13 @@ class HttpCache::Transaction : public HttpTransaction {
const std::string& key() const { return cache_key_; }
- // Associates this transaction with a cache entry.
- int AddToEntry();
-
- // Called by the HttpCache when the given disk cache entry becomes accessible
- // to the transaction. Returns network error code.
- int EntryAvailable(ActiveEntry* entry);
-
// This transaction is being deleted and we are not done writing to the cache.
// We need to indicate that the response data was truncated. Returns true on
// success.
bool AddTruncatedFlag();
+ CompletionCallback* io_callback() { return &io_callback_; }
+
private:
static const size_t kNumValidationHeaders = 2;
// Helper struct to pair a header name with its value, for
@@ -109,7 +104,7 @@ class HttpCache::Transaction : public HttpTransaction {
STATE_DOOM_ENTRY,
STATE_DOOM_ENTRY_COMPLETE,
STATE_ADD_TO_ENTRY,
- STATE_ENTRY_AVAILABLE,
+ STATE_ADD_TO_ENTRY_COMPLETE,
STATE_PARTIAL_CACHE_VALIDATION,
STATE_UPDATE_CACHED_RESPONSE,
STATE_UPDATE_CACHED_RESPONSE_COMPLETE,
@@ -156,7 +151,7 @@ class HttpCache::Transaction : public HttpTransaction {
int DoDoomEntry();
int DoDoomEntryComplete(int result);
int DoAddToEntry();
- int DoEntryAvailable();
+ int DoAddToEntryComplete(int result);
int DoPartialCacheValidation();
int DoUpdateCachedResponse();
int DoUpdateCachedResponseComplete(int result);
@@ -183,6 +178,9 @@ class HttpCache::Transaction : public HttpTransaction {
// layer (skipping the cache entirely).
bool ShouldPassThrough();
+ // Associates this transaction with a cache entry.
+ int AddToEntry();
+
// Called to begin reading from the cache. Returns network error code.
int BeginCacheRead();