summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/mock_appcache_storage.h
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 22:02:28 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 22:02:28 +0000
commitfd2885ab79962663f474a39b13cfbfdb4827534e (patch)
tree1ce0e0967d005178a64cf0d4a7e11e16a76fd3d8 /webkit/appcache/mock_appcache_storage.h
parent9348c1f762db498d399d07c0295e36d75ee7fa08 (diff)
downloadchromium_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/mock_appcache_storage.h')
-rw-r--r--webkit/appcache/mock_appcache_storage.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/webkit/appcache/mock_appcache_storage.h b/webkit/appcache/mock_appcache_storage.h
index 10bd780..36a1c2e 100644
--- a/webkit/appcache/mock_appcache_storage.h
+++ b/webkit/appcache/mock_appcache_storage.h
@@ -12,8 +12,8 @@
#include "base/hash_tables.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
-#include "net/disk_cache/disk_cache.h"
#include "webkit/appcache/appcache.h"
+#include "webkit/appcache/appcache_disk_cache.h"
#include "webkit/appcache/appcache_group.h"
#include "webkit/appcache/appcache_storage.h"
@@ -94,10 +94,11 @@ class MockAppCacheStorage : public AppCacheStorage {
bool ShouldCacheLoadAppearAsync(const AppCache* cache);
// Lazily constructed in-memory disk cache.
- disk_cache::Backend* disk_cache() {
+ AppCacheDiskCache* disk_cache() {
if (!disk_cache_.get()) {
const int kMaxCacheSize = 10 * 1024 * 1024;
- disk_cache_.reset(disk_cache::CreateInMemoryCacheBackend(kMaxCacheSize));
+ disk_cache_.reset(new AppCacheDiskCache);
+ disk_cache_->InitWithMemBackend(kMaxCacheSize, NULL);
}
return disk_cache_.get();
}
@@ -143,7 +144,7 @@ class MockAppCacheStorage : public AppCacheStorage {
StoredCacheMap stored_caches_;
StoredGroupMap stored_groups_;
DoomedResponseIds doomed_response_ids_;
- scoped_ptr<disk_cache::Backend> disk_cache_;
+ scoped_ptr<AppCacheDiskCache> disk_cache_;
std::deque<Task*> pending_tasks_;
ScopedRunnableMethodFactory<MockAppCacheStorage> method_factory_;