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

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: fix comment 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..989de67609c8c37ea99ab75efa9192d68914bf43 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 before closing the file.
+ 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;
« no previous file with comments | « content/browser/renderer_host/pepper/quota_reservation.cc ('k') | webkit/browser/fileapi/quota/open_file_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698