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

Unified Diff: webkit/chromeos/fileapi/cros_mount_point_provider.cc

Issue 10873055: Changed FileSystemPointProvider::IsAcccessAllowed() to take a single FileSystemURL instead of a tri… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for typos from Kinuko's review. Sorry, I will look more closely at my own diff next time Created 8 years, 4 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
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 20c1c52679b389a6f56e6dd3e34f2cf8381ffc0f..1e65bef54035e9467ddf095c472b45f706e50090 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -87,16 +87,16 @@ FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread(
return root_path.DirName();
}
-bool CrosMountPointProvider::IsAccessAllowed(const GURL& origin_url,
- fileapi::FileSystemType type,
- const FilePath& virtual_path) {
+bool CrosMountPointProvider::IsAccessAllowed(
+ const fileapi::FileSystemURL& url) {
// TODO(kinuko): this should call CanHandleURL() once
// http://crbug.com/142267 is fixed.
- if (type != fileapi::kFileSystemTypeNativeLocal &&
- type != fileapi::kFileSystemTypeDrive)
+ if (url.type() != fileapi::kFileSystemTypeNativeLocal &&
+ url.type() != fileapi::kFileSystemTypeDrive)
return false;
// Permit access to mount points from internal WebUI.
+ const GURL& origin_url = url.origin();
if (origin_url.SchemeIs(kChromeUIScheme))
return true;
@@ -106,7 +106,7 @@ bool CrosMountPointProvider::IsAccessAllowed(const GURL& origin_url,
return false;
return file_access_permissions_->HasAccessPermission(extension_id,
- virtual_path);
+ url.virtual_path());
}
// TODO(zelidrag): Share this code with SandboxMountPointProvider impl.

Powered by Google App Engine
This is Rietveld 408576698