summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_working_set.h
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-29 22:46:55 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-29 22:46:55 +0000
commit35f2094cd0ac27018aff2646445f44c3f9ee8d36 (patch)
tree0f4892fb2f6bcf9d5f044e70c1cf1ed0d42bb882 /webkit/appcache/appcache_working_set.h
parent6d38a7fc2594f14cbb87e28389c81965381b64e8 (diff)
downloadchromium_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_working_set.h')
-rw-r--r--webkit/appcache/appcache_working_set.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_working_set.h b/webkit/appcache/appcache_working_set.h
index 6785d50..479e74d 100644
--- a/webkit/appcache/appcache_working_set.h
+++ b/webkit/appcache/appcache_working_set.h
@@ -20,6 +20,8 @@ class AppCacheResponseInfo;
// currently in memory.
class AppCacheWorkingSet {
public:
+ typedef std::map<GURL, AppCacheGroup*> GroupMap;
+
~AppCacheWorkingSet();
void AddCache(AppCache* cache);
@@ -36,6 +38,10 @@ class AppCacheWorkingSet {
return (it != groups_.end()) ? it->second : NULL;
}
+ const GroupMap* GetGroupsInOrigin(const GURL& origin_url) {
+ return GetMutableGroupsInOrigin(origin_url);
+ }
+
void AddResponseInfo(AppCacheResponseInfo* response_info);
void RemoveResponseInfo(AppCacheResponseInfo* response_info);
AppCacheResponseInfo* GetResponseInfo(int64 id) {
@@ -45,10 +51,17 @@ class AppCacheWorkingSet {
private:
typedef base::hash_map<int64, AppCache*> CacheMap;
- typedef std::map<GURL, AppCacheGroup*> GroupMap;
+ typedef std::map<GURL, GroupMap> GroupsByOriginMap;
typedef base::hash_map<int64, AppCacheResponseInfo*> ResponseInfoMap;
+
+ GroupMap* GetMutableGroupsInOrigin(const GURL& origin_url) {
+ GroupsByOriginMap::iterator it = groups_by_origin_.find(origin_url);
+ return (it != groups_by_origin_.end()) ? &it->second : NULL;
+ }
+
CacheMap caches_;
GroupMap groups_;
+ GroupsByOriginMap groups_by_origin_; // origin -> (manifest -> group)
ResponseInfoMap response_infos_;
};