diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 22:02:28 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 22:02:28 +0000 |
commit | fd2885ab79962663f474a39b13cfbfdb4827534e (patch) | |
tree | 1ce0e0967d005178a64cf0d4a7e11e16a76fd3d8 /webkit/appcache/appcache_storage_impl.h | |
parent | 9348c1f762db498d399d07c0295e36d75ee7fa08 (diff) | |
download | chromium_src-fd2885ab79962663f474a39b13cfbfdb4827534e.zip chromium_src-fd2885ab79962663f474a39b13cfbfdb4827534e.tar.gz chromium_src-fd2885ab79962663f474a39b13cfbfdb4827534e.tar.bz2 |
AppCache: Migrate to the DiskCache's async interface and use the CacheType::APP_CACHE value.
BUG=38273
TEST=existing layout tests and unit tests apply
Review URL: http://codereview.chromium.org/886003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage_impl.h')
-rw-r--r-- | webkit/appcache/appcache_storage_impl.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/webkit/appcache/appcache_storage_impl.h b/webkit/appcache/appcache_storage_impl.h index 5771dd4..4fea4d4 100644 --- a/webkit/appcache/appcache_storage_impl.h +++ b/webkit/appcache/appcache_storage_impl.h @@ -12,8 +12,8 @@ #include "base/file_path.h" #include "base/task.h" -#include "net/disk_cache/disk_cache.h" #include "webkit/appcache/appcache_database.h" +#include "webkit/appcache/appcache_disk_cache.h" #include "webkit/appcache/appcache_storage.h" namespace appcache { @@ -95,6 +95,9 @@ class AppCacheStorageImpl : public AppCacheStorage { void ScheduleDeleteOneResponse(); void DeleteOneResponse(); + void OnDeletedOneResponse(int rv); + void OnDiskCacheInitialized(int rv); + // Sometimes we can respond without having to query the database. void DeliverShortCircuitedFindMainResponse( const GURL& url, AppCacheEntry found_entry, @@ -106,7 +109,7 @@ class AppCacheStorageImpl : public AppCacheStorage { const AppCacheEntry& entry, const AppCacheEntry& fallback_entry, int64 cache_id, const GURL& manifest_url); - disk_cache::Backend* disk_cache(); + AppCacheDiskCache* disk_cache(); // The directory in which we place files in the file system. FilePath cache_directory_; @@ -125,6 +128,10 @@ class AppCacheStorageImpl : public AppCacheStorage { bool did_start_deleting_responses_; int64 last_deletable_response_rowid_; + // AppCacheDiskCache async callbacks + net::CompletionCallbackImpl<AppCacheStorageImpl> doom_callback_; + net::CompletionCallbackImpl<AppCacheStorageImpl> init_callback_; + // Created on the IO thread, but only used on the DB thread. AppCacheDatabase* database_; @@ -133,7 +140,7 @@ class AppCacheStorageImpl : public AppCacheStorage { bool is_disabled_; // TODO(michaeln): use a disk_cache per group (manifest or group_id). - scoped_ptr<disk_cache::Backend> disk_cache_; + scoped_ptr<AppCacheDiskCache> disk_cache_; // Used to short-circuit certain operations without having to schedule // any tasks on the background database thread. |