Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: webkit/browser/fileapi/quota/open_file_handle.h

Issue 140833003: [Pepper][FileAPI] Interface clean up (3/6) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/browser/fileapi/quota/open_file_handle.h
diff --git a/webkit/browser/fileapi/quota/open_file_handle.h b/webkit/browser/fileapi/quota/open_file_handle.h
index 79f1380a4372cd798cb1dbc529249b0dae2b358d..40b0383733a1782a910b5ee6e2e546e2746ecef4 100644
--- a/webkit/browser/fileapi/quota/open_file_handle.h
+++ b/webkit/browser/fileapi/quota/open_file_handle.h
@@ -24,13 +24,17 @@ class WEBKIT_STORAGE_BROWSER_EXPORT OpenFileHandle {
~OpenFileHandle();
// Updates cached file size and consumes quota for that.
- // This should be called for each modified file before calling RefreshQuota
- // and file close.
- // Returns updated base file size that should be used to measure quota
- // consumption by difference to this.
- int64 UpdateMaxWrittenOffset(int64 offset);
-
- int64 base_file_size() const;
+ // This should be called for each modified file before calling
+ // QuotaReservation::RefreshQuota and file close.
bbudge 2014/01/16 13:47:42 s/file close/and before closing the file. This ma
tzik 2014/01/17 04:04:03 Done.
+ void UpdateMaxWrittenOffset(int64 offset);
+
+ // Returns the estimated file size for the quota consumption calculation.
+ // The client must consume its reserved quota when it writes data to the file
+ // beyond the estimated file size.
+ // The estimated file size is greater than or equal to actual file size after
+ // all clients report their file usage, and is monotonically increasing over
+ // OpenFileHandle object life cycle, so that client may cache the value.
+ int64 GetEstimatedFileSize() const;
private:
friend class QuotaReservationBuffer;

Powered by Google App Engine
This is Rietveld 408576698