diff options
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_; }; |