summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_database.h
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 22:25:33 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 22:25:33 +0000
commit0dfeec38d00d53b6751a937e43394d6036987698 (patch)
treeb8641d3bd07cbe185deb9f1dba29acb551bb92a2 /webkit/appcache/appcache_database.h
parentf1002ee286ad56e2b80736661e89989b650aad6e (diff)
downloadchromium_src-0dfeec38d00d53b6751a937e43394d6036987698.zip
chromium_src-0dfeec38d00d53b6751a937e43394d6036987698.tar.gz
chromium_src-0dfeec38d00d53b6751a937e43394d6036987698.tar.bz2
AppCache quota tracking groundwork, store response sizes in the SQL database.
TEST=updated existing unittests BUG=none Review URL: http://codereview.chromium.org/525060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_database.h')
-rw-r--r--webkit/appcache/appcache_database.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_database.h b/webkit/appcache/appcache_database.h
index 89ff701..5f1713e 100644
--- a/webkit/appcache/appcache_database.h
+++ b/webkit/appcache/appcache_database.h
@@ -30,6 +30,7 @@ class AppCacheDatabase {
int64 group_id;
GURL origin;
GURL manifest_url;
+ GroupRecord() : group_id(0) {}
};
struct CacheRecord {
@@ -37,6 +38,9 @@ class AppCacheDatabase {
int64 group_id;
bool online_wildcard;
base::TimeTicks update_time;
+ int64 cache_size; // the sum of all response sizes in this cache
+ CacheRecord()
+ : cache_id(0), group_id(0), online_wildcard(false), cache_size(0) {}
};
struct EntryRecord {
@@ -44,6 +48,8 @@ class AppCacheDatabase {
GURL url;
int flags;
int64 response_id;
+ int64 response_size;
+ EntryRecord() : cache_id(0), flags(0), response_id(0), response_size(0) {}
};
struct FallbackNameSpaceRecord {
@@ -51,11 +57,13 @@ class AppCacheDatabase {
GURL origin; // intentionally not normalized
GURL namespace_url;
GURL fallback_entry_url;
+ FallbackNameSpaceRecord() : cache_id(0) {}
};
struct OnlineWhiteListRecord {
int64 cache_id;
GURL namespace_url;
+ OnlineWhiteListRecord() : cache_id(0) {}
};
explicit AppCacheDatabase(const FilePath& path);