summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_storage.h
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 20:57:50 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 20:57:50 +0000
commita84e7b5ec1cbdfe2d6943693d8bd71fcb6c64ce7 (patch)
treedf6dbcf9a6bca8343355ffef01eeed49f6059b83 /webkit/appcache/appcache_storage.h
parent45699d6054f62173d0cd9df0f43af65047d76d79 (diff)
downloadchromium_src-a84e7b5ec1cbdfe2d6943693d8bd71fcb6c64ce7.zip
chromium_src-a84e7b5ec1cbdfe2d6943693d8bd71fcb6c64ce7.tar.gz
chromium_src-a84e7b5ec1cbdfe2d6943693d8bd71fcb6c64ce7.tar.bz2
Trigger the deletion of unused responses when caches are updated and made obsolete (deleted).
BUG=none TEST=not yet Review URL: http://codereview.chromium.org/542021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage.h')
-rw-r--r--webkit/appcache/appcache_storage.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h
index 7c31ca5..8f10b78 100644
--- a/webkit/appcache/appcache_storage.h
+++ b/webkit/appcache/appcache_storage.h
@@ -140,15 +140,18 @@ class AppCacheStorage {
virtual AppCacheResponseWriter* CreateResponseWriter(
const GURL& manifest_url) = 0;
- // Schedules the imminent deletion of many responses.
+ // Schedules the lazy deletion of responses and saves the ids
+ // persistently such that the responses will be deleted upon restart
+ // if they aren't deleted prior to shutdown.
virtual void DoomResponses(
const GURL& manifest_url, const std::vector<int64>& response_ids) = 0;
- // Schedules the imminent deletion of a single response.
- void DoomResponse(const GURL& manifest_url, int64 response_id) {
- std::vector<int64> response_ids(1, response_id);
- DoomResponses(manifest_url, response_ids);
- }
+ // Schedules the lazy deletion of responses without persistently saving
+ // the response ids.
+ virtual void DeleteResponses(
+ const GURL& manifest_url, const std::vector<int64>& response_ids) = 0;
+
+ virtual void PurgeMemory() = 0;
// Generates unique storage ids for different object types.
int64 NewCacheId() {