summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkit_glue.cc
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 09:52:07 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 09:52:07 +0000
commit70c6c0434d1d02f3994ec65054a0860ee20e7d43 (patch)
treea5bb9840ebeda22497f5e98cff7c6f34087d6e0b /webkit/glue/webkit_glue.cc
parentda8f24a7eb62b20a29413c8b1bd1ccd156cfb593 (diff)
downloadchromium_src-70c6c0434d1d02f3994ec65054a0860ee20e7d43.zip
chromium_src-70c6c0434d1d02f3994ec65054a0860ee20e7d43.tar.gz
chromium_src-70c6c0434d1d02f3994ec65054a0860ee20e7d43.tar.bz2
Allow unlimited quota for apps for FileSystem access
- allow unlimited access for apps/extensions that have "unlimited_storage" permission. - disallow any write access that may increase the filesystem usage (i.e. copy/move/create/write). for others. - allow unlimit access for file:/// URIs only if --allow-file-from-files flag is given. BUG=57211 TEST=FileSystemQuota.* TEST=Load a remote test page and verify that it throws QUOTA_EXCEEDED_ERR (22) for any write access. TEST=Load an app/extension page that has "unlimited_storage" permission and verify that any write access is allowed. TEST=Disable or uninstall the app/extension and do the same. Verify that it throws QUOTA_EXCEEDED_ERR (22) for any write access. TEST=Launch chromium without --allow-file-from-files flag, load a local test page (with file:/// URI) and verify that it throws SECURITY_ERR (18) for requesetFileSystem. TEST=Launch chromium with --allow-file-from-files flag and do the same. Verify that requestFileSystem returns a valid filesystem and any write access is allowed. Review URL: http://codereview.chromium.org/3561016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.cc')
-rw-r--r--webkit/glue/webkit_glue.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index f7f60aa..a58ff1b 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -330,6 +330,10 @@ WebKit::WebFileError PlatformFileErrorToWebFileError(
return WebKit::WebFileErrorInvalidState;
case base::PLATFORM_FILE_ERROR_ABORT:
return WebKit::WebFileErrorAbort;
+ case base::PLATFORM_FILE_ERROR_SECURITY:
+ return WebKit::WebFileErrorSecurity;
+ case base::PLATFORM_FILE_ERROR_NO_SPACE:
+ return WebKit::WebFileErrorQuotaExceeded;
default:
return WebKit::WebFileErrorInvalidModification;
}