diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 22:46:55 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 22:46:55 +0000 |
commit | 35f2094cd0ac27018aff2646445f44c3f9ee8d36 (patch) | |
tree | 0f4892fb2f6bcf9d5f044e70c1cf1ed0d42bb882 /webkit/appcache/appcache.h | |
parent | 6d38a7fc2594f14cbb87e28389c81965381b64e8 (diff) | |
download | chromium_src-35f2094cd0ac27018aff2646445f44c3f9ee8d36.zip chromium_src-35f2094cd0ac27018aff2646445f44c3f9ee8d36.tar.gz chromium_src-35f2094cd0ac27018aff2646445f44c3f9ee8d36.tar.bz2 |
AppCacheDatabase and SQL based AppCacheStorageImpl.
Still nothing is being written to disk with this CL,
in-memory SQLite and DiskCaches are being utilized.
Responses are not yet being removed from the DiskCasche
when the should be. Once that's done (in the next CL), we'll
start saving things on disk.
BUG=none
TEST=appcache_database_unittest.cc, appcache_storage_impl_unittest.cc
Review URL: http://codereview.chromium.org/518020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache.h')
-rw-r--r-- | webkit/appcache/appcache.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/webkit/appcache/appcache.h b/webkit/appcache/appcache.h index 6e43a85..c4446f9 100644 --- a/webkit/appcache/appcache.h +++ b/webkit/appcache/appcache.h @@ -14,6 +14,7 @@ #include "base/time.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest_prod.h" +#include "webkit/appcache/appcache_database.h" #include "webkit/appcache/appcache_entry.h" #include "webkit/appcache/manifest_parser.h" @@ -75,6 +76,22 @@ class AppCache : public base::RefCounted<AppCache> { // Do not use the manifest after this call. void InitializeWithManifest(Manifest* manifest); + // Initializes the cache with the information in the database records. + void InitializeWithDatabaseRecords( + const AppCacheDatabase::CacheRecord& cache_record, + const std::vector<AppCacheDatabase::EntryRecord>& entries, + const std::vector<AppCacheDatabase::FallbackNameSpaceRecord>& fallbacks, + const std::vector<AppCacheDatabase::OnlineWhiteListRecord>& whitelists); + + // Returns the database records to be stored in the AppCacheDatabase + // to represent this cache. + void ToDatabaseRecords( + const AppCacheGroup* group, + AppCacheDatabase::CacheRecord* cache_record, + std::vector<AppCacheDatabase::EntryRecord>* entries, + std::vector<AppCacheDatabase::FallbackNameSpaceRecord>* fallbacks, + std::vector<AppCacheDatabase::OnlineWhiteListRecord>* whitelists); + bool FindResponseForRequest(const GURL& url, AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, GURL* found_fallback_namespace, bool* found_network_namespace); @@ -82,6 +99,7 @@ class AppCache : public base::RefCounted<AppCache> { private: friend class AppCacheGroup; friend class AppCacheHost; + friend class AppCacheStorageImplTest; friend class AppCacheUpdateJobTest; friend class base::RefCounted<AppCache>; |