diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-06 03:26:41 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-06 03:26:41 +0000 |
commit | fd4882e6faab19e1de6d791acebfa3b34faf5701 (patch) | |
tree | 2fa95bddd8b6189d0dd7b850d24da0b7ab382e28 /webkit/appcache/appcache_response.h | |
parent | 12e8fecd3923d3ace7fe3f505ba3fa490b5417c1 (diff) | |
download | chromium_src-fd4882e6faab19e1de6d791acebfa3b34faf5701.zip chromium_src-fd4882e6faab19e1de6d791acebfa3b34faf5701.tar.gz chromium_src-fd4882e6faab19e1de6d791acebfa3b34faf5701.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/523046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_response.h')
-rw-r--r-- | webkit/appcache/appcache_response.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_response.h b/webkit/appcache/appcache_response.h index 419e739..f8ffcc6 100644 --- a/webkit/appcache/appcache_response.h +++ b/webkit/appcache/appcache_response.h @@ -184,6 +184,9 @@ class AppCacheResponseWriter : public AppCacheResponseIO { // Returns true if there is a write pending. bool IsWritePending() { return IsIOPending(); } + // Returns the amount written, info and data. + int64 amount_written() { return info_size_ + write_position_; } + private: friend class AppCacheStorageImpl; friend class MockAppCacheStorage; @@ -191,11 +194,12 @@ class AppCacheResponseWriter : public AppCacheResponseIO { // Should only be constructed by the storage class. AppCacheResponseWriter(int64 response_id, disk_cache::Backend* disk_cache) : AppCacheResponseIO(response_id, disk_cache), - write_position_(0), write_amount_(0) {} + info_size_(0), write_position_(0), write_amount_(0) {} virtual void OnIOComplete(int result); bool CreateEntryIfNeeded(); + int info_size_; int write_position_; int write_amount_; }; |