Chromium Code Reviews| 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; |