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

Unified Diff: webkit/fileapi/sandbox_mount_point_provider.cc

Issue 11804005: Cleanup file permission check code in FileAPIMessageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros+native-local perm fix Created 7 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
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.h ('k') | webkit/fileapi/test_mount_point_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/sandbox_mount_point_provider.cc
diff --git a/webkit/fileapi/sandbox_mount_point_provider.cc b/webkit/fileapi/sandbox_mount_point_provider.cc
index 8ffd14421a23144a464e2d87f40a90aef0ab319f..0ed81b493e24e375c226d77c14421e498bff5062 100644
--- a/webkit/fileapi/sandbox_mount_point_provider.cc
+++ b/webkit/fileapi/sandbox_mount_point_provider.cc
@@ -255,11 +255,13 @@ FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil(
return sandbox_file_util_.get();
}
-FilePath SandboxMountPointProvider::GetPathForPermissionsCheck(
- const FilePath& virtual_path) const {
- // Sandbox provider shouldn't directly grant permissions for its
- // data directory.
- return FilePath();
+FilePermissionPolicy SandboxMountPointProvider::GetPermissionPolicy(
+ const FileSystemURL& url, int permissions) const {
+ // Access to the sandbox directory (and only to the directory) should be
+ // always allowed.
+ CHECK(CanHandleType(url.type()));
+ CHECK(!url.path().ReferencesParent());
+ return FILE_PERMISSION_ALWAYS_ALLOW;
}
FileSystemOperation* SandboxMountPointProvider::CreateFileSystemOperation(
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.h ('k') | webkit/fileapi/test_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698