diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 00:09:21 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 00:09:21 +0000 |
commit | 3367fc1dd134eeaf9ab6e62397f05ad3964319fe (patch) | |
tree | 78fb4d7ac912bbaf47b64f0aaefef331906b5fca /webkit/appcache/appcache_storage.h | |
parent | 9f9e1fcbbd52267fa657b3b0b80ece683ceb6dd6 (diff) | |
download | chromium_src-3367fc1dd134eeaf9ab6e62397f05ad3964319fe.zip chromium_src-3367fc1dd134eeaf9ab6e62397f05ad3964319fe.tar.gz chromium_src-3367fc1dd134eeaf9ab6e62397f05ad3964319fe.tar.bz2 |
AppCache changes to the networking model. Added new classes AppCacheRequestHandler and AppCacheURLRequestJob.
TEST=appcache_url_request_job_unittest.cc, appcache_request_handler_unittest.cc
BUG=none
Review URL: http://codereview.chromium.org/338034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage.h')
-rw-r--r-- | webkit/appcache/appcache_storage.h | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h index 608ea34..67717a5 100644 --- a/webkit/appcache/appcache_storage.h +++ b/webkit/appcache/appcache_storage.h @@ -55,6 +55,7 @@ class AppCacheStorage { // containing cache and group are also returned. virtual void OnMainResponseFound( const GURL& url, const AppCacheEntry& entry, + const AppCacheEntry& fallback_entry, int64 cache_id, const GURL& mainfest_url) {} }; @@ -99,6 +100,13 @@ class AppCacheStorage { virtual void FindResponseForMainRequest( const GURL& url, Delegate* delegate) = 0; + // Performs an immediate lookup of the in-memory cache to + // identify a response for a sub resource request. + virtual void FindResponseForSubRequest( + AppCache* cache, const GURL& url, + AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, + bool* found_network_namespace) = 0; + // Immediately updates in-memory storage, if the cache is in memory, // and schedules a task to update persistent storage. If the cache is // already scheduled to be loaded, upon loading completion the entry @@ -201,15 +209,15 @@ class AppCacheStorage { class ResponseInfoLoadTask { public: ResponseInfoLoadTask(const GURL& manifest_url, int64 response_id, - AppCacheStorage* storage) : - storage_(storage), - manifest_url_(manifest_url), - response_id_(response_id), - info_buffer_(new HttpResponseInfoIOBuffer), - ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_( - this, &ResponseInfoLoadTask::OnReadComplete)) { - ALLOW_THIS_IN_INITIALIZER_LIST(storage_->pending_info_loads_.insert( - PendingResponseInfoLoads::value_type(response_id, this))); + AppCacheStorage* storage) + : storage_(storage), + manifest_url_(manifest_url), + response_id_(response_id), + info_buffer_(new HttpResponseInfoIOBuffer), + ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_( + this, &ResponseInfoLoadTask::OnReadComplete)) { + storage_->pending_info_loads_.insert( + PendingResponseInfoLoads::value_type(response_id, this)); } int64 response_id() const { return response_id_; } @@ -233,7 +241,7 @@ class AppCacheStorage { scoped_refptr<AppCacheResponseInfo> info; if (result >= 0) { info = new AppCacheResponseInfo( - storage_->service(), reader_->response_id(), + storage_->service(), manifest_url_, response_id_, info_buffer_->http_info.release()); } FOR_EACH_DELEGATE( |