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

Unified Diff: webkit/chromeos/fileapi/cros_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/chromeos/fileapi/cros_mount_point_provider.h ('k') | webkit/fileapi/file_permission_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/chromeos/fileapi/cros_mount_point_provider.cc
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index f98b1382b5507d3a5c6554422aa49071c9997c4f..54beb96f47f6c1823423659a08a2d68fa00c6052 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -235,9 +235,14 @@ fileapi::FileSystemFileUtil* CrosMountPointProvider::GetFileUtil(
return local_file_util_.get();
}
-FilePath CrosMountPointProvider::GetPathForPermissionsCheck(
- const FilePath& virtual_path) const {
- return virtual_path;
+fileapi::FilePermissionPolicy CrosMountPointProvider::GetPermissionPolicy(
+ const fileapi::FileSystemURL& url, int permissions) const {
+ if (url.mount_type() == fileapi::kFileSystemTypeIsolated) {
+ // Permissions in isolated filesystems should be examined with
+ // FileSystem permission.
+ return fileapi::FILE_PERMISSION_USE_FILESYSTEM_PERMISSION;
+ }
+ return fileapi::FILE_PERMISSION_USE_FILE_PERMISSION;
}
fileapi::FileSystemOperation* CrosMountPointProvider::CreateFileSystemOperation(
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.h ('k') | webkit/fileapi/file_permission_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698