summaryrefslogtreecommitdiffstats
path: root/content/renderer/pepper_plugin_delegate_impl.h
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-01 11:46:41 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-01 11:46:41 +0000
commit858e7754232217bfa9049fd59cbccaebe2d7b1f7 (patch)
treedc661801a75a7f52b1386d4b4c9bb6d5ac172399 /content/renderer/pepper_plugin_delegate_impl.h
parent7a8b93cee8626b02f46ca575d7bb30d1f2534a21 (diff)
downloadchromium_src-858e7754232217bfa9049fd59cbccaebe2d7b1f7.zip
chromium_src-858e7754232217bfa9049fd59cbccaebe2d7b1f7.tar.gz
chromium_src-858e7754232217bfa9049fd59cbccaebe2d7b1f7.tar.bz2
Pepper quota support
Probably this could be better implemented using push notification model, but in this patch I made this very straightforwardly (with possibly minimal change). **NOTE: This design may not be really safe as quota accounting is done in renderer** * Added QuotaFileIO class (in quota_file_io.{cc,h}) which performs pre- and post- write quota related operations. * For Write/SetLength the QuotaFileIO instance first performs QueryFileInfo and QueryAvailableSpace to get the file size and current available space. If the results look good it dispatches actual Write/SetLength operations. After the operation has succeeded it then notifies the browser that it has made a storage modify operation. * For WillWrite/WillSetLength this change assumes they are always followed by actual write/setlength operations and the operations will succeed. Based on another cleanup patch: http://codereview.chromium.org/7438001/ BUG=86556 TEST=manually tested Review URL: http://codereview.chromium.org/7433006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/pepper_plugin_delegate_impl.h')
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h
index 20cb7f82..e465dfe 100644
--- a/content/renderer/pepper_plugin_delegate_impl.h
+++ b/content/renderer/pepper_plugin_delegate_impl.h
@@ -225,6 +225,11 @@ class PepperPluginDelegateImpl
const GURL& directory_path,
fileapi::FileSystemCallbackDispatcher* dispatcher) OVERRIDE;
virtual void PublishPolicy(const std::string& policy_json) OVERRIDE;
+ virtual void QueryAvailableSpace(const GURL& origin,
+ quota::StorageType type,
+ AvailableSpaceCallback* callback) OVERRIDE;
+ virtual void WillUpdateFile(const GURL& file_path) OVERRIDE;
+ virtual void DidUpdateFile(const GURL& file_path, int64_t delta) OVERRIDE;
virtual base::PlatformFileError OpenFile(
const webkit::ppapi::PepperFilePath& path,
int flags,