summaryrefslogtreecommitdiffstats
path: root/webkit/browser/fileapi/quota/open_file_handle.cc
diff options
context:
space:
mode:
authortzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-22 14:48:33 +0000
committertzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-22 14:48:33 +0000
commitad6842c2aa5f6b96ad0a21b18fa6406dd52dddae (patch)
tree0dddcfcae0b101cadc85a9275b3e7b691e042649 /webkit/browser/fileapi/quota/open_file_handle.cc
parent5958c6bc4d6b28314565c3f907a6fee84a944901 (diff)
downloadchromium_src-ad6842c2aa5f6b96ad0a21b18fa6406dd52dddae.zip
chromium_src-ad6842c2aa5f6b96ad0a21b18fa6406dd52dddae.tar.gz
chromium_src-ad6842c2aa5f6b96ad0a21b18fa6406dd52dddae.tar.bz2
[Pepper] Calculate reserved quota consumption by diff to maximum written offset
Use maximum written offset to calculate the quota consumption. Calculating it by diff to EstimatedFileSize makes quota calculation very difficult. This CL turns the strategy more conservative. BUG=334171 Review URL: https://codereview.chromium.org/143253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser/fileapi/quota/open_file_handle.cc')
-rw-r--r--webkit/browser/fileapi/quota/open_file_handle.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/browser/fileapi/quota/open_file_handle.cc b/webkit/browser/fileapi/quota/open_file_handle.cc
index 63ecb17..27f50b1 100644
--- a/webkit/browser/fileapi/quota/open_file_handle.cc
+++ b/webkit/browser/fileapi/quota/open_file_handle.cc
@@ -35,6 +35,11 @@ int64 OpenFileHandle::GetEstimatedFileSize() const {
return context_->GetEstimatedFileSize();
}
+int64 OpenFileHandle::GetMaxWrittenOffset() const {
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
+ return context_->GetMaxWrittenOffset();
+}
+
const base::FilePath& OpenFileHandle::platform_path() const {
DCHECK(sequence_checker_.CalledOnValidSequencedThread());
return context_->platform_path();