diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 19:18:36 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 19:18:36 +0000 |
commit | 4252f6098889f2c5a8649d1688b269e53a51d42d (patch) | |
tree | bbb1040a665b91ac297685ee6b7add579822a911 /webkit/appcache/appcache_request_handler.h | |
parent | 29a6c9738ebb608d40567189452fd9c19f55569c (diff) | |
download | chromium_src-4252f6098889f2c5a8649d1688b269e53a51d42d.zip chromium_src-4252f6098889f2c5a8649d1688b269e53a51d42d.tar.gz chromium_src-4252f6098889f2c5a8649d1688b269e53a51d42d.tar.bz2 |
More groundwork for filestream based response storage.
This CL touches many files, but it amounts to mindless plumbing of a group_id value.
This doesn't involve any new database or fileio or task scheduling.
In order to read or write a response, callers now need to provide the group_id of
the corresponding manifest, so the AppCacheStorage CreateRepsonseReader() and
CreateResponseWriter() methods now take this additional parameter.
The current disk_cache based impl doesn't use this param for anything, but the
filestream based impl will use it to keep responses for a group in a particular
subdirectory.
When looking up the main resource for a page load via FindResponseForMainRequest,
the group_id needs to be returned so the response may later be read, the
AppCacheStorage::Delegate OnMainResponseFound() method has a param for that.
A bunch of callsites, tests, and mocks are updated accordingly.
BUG=78359
Review URL: http://codereview.chromium.org/8343018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_request_handler.h')
-rw-r--r-- | webkit/appcache/appcache_request_handler.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/webkit/appcache/appcache_request_handler.h b/webkit/appcache/appcache_request_handler.h index e2f5b94..b4a387d 100644 --- a/webkit/appcache/appcache_request_handler.h +++ b/webkit/appcache/appcache_request_handler.h @@ -53,13 +53,13 @@ class APPCACHE_EXPORT AppCacheRequestHandler AppCacheRequestHandler(AppCacheHost* host, ResourceType::Type resource_type); // AppCacheHost::Observer override - virtual void OnDestructionImminent(AppCacheHost* host); + virtual void OnDestructionImminent(AppCacheHost* host) OVERRIDE; // Helpers to instruct a waiting job with what response to // deliver for the request we're handling. void DeliverAppCachedResponse(const AppCacheEntry& entry, int64 cache_id, - const GURL& manifest_url, bool is_fallback, - const GURL& fallback_url); + int64 group_id, const GURL& manifest_url, + bool is_fallback, const GURL& fallback_url); void DeliverNetworkResponse(); void DeliverErrorResponse(); @@ -79,7 +79,7 @@ class APPCACHE_EXPORT AppCacheRequestHandler virtual void OnMainResponseFound( const GURL& url, const AppCacheEntry& entry, const GURL& fallback_url, const AppCacheEntry& fallback_entry, - int64 cache_id, const GURL& mainfest_url); + int64 cache_id, int64 group_id, const GURL& mainfest_url) OVERRIDE; // Sub-resource loading ------------------------------------- // Dedicated worker and all manner of sub-resources are handled here. @@ -88,7 +88,7 @@ class APPCACHE_EXPORT AppCacheRequestHandler void ContinueMaybeLoadSubResource(); // AppCacheHost::Observer override - virtual void OnCacheSelectionComplete(AppCacheHost* host); + virtual void OnCacheSelectionComplete(AppCacheHost* host) OVERRIDE; // Data members ----------------------------------------------- @@ -103,6 +103,7 @@ class APPCACHE_EXPORT AppCacheRequestHandler // Info about the type of response we found for delivery. // These are relevant for both main and subresource requests. + int64 found_group_id_; int64 found_cache_id_; AppCacheEntry found_entry_; AppCacheEntry found_fallback_entry_; |