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

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: 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 fcb71ce8396e82022a8dc43229cdc490cd280b3c..5073ed76d107cd5f59d976935d7244a84c1cceec 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -96,13 +96,13 @@ FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread(
return root_path;
}
-bool CrosMountPointProvider::IsAccessAllowed(const GURL& origin_url,
- fileapi::FileSystemType type,
- const FilePath& virtual_path) {
- if (type != fileapi::kFileSystemTypeExternal)
+bool CrosMountPointProvider::IsAccessAllowed(
+ const fileapi::FileSystemURL& url) {
+ if (url.type() != fileapi::kFileSystemTypeExternal)
return false;
// Permit access to mount points from internal WebUI.
+ const GURL& origin_url = url.origin();
if (origin_url.SchemeIs(kChromeUIScheme))
return true;
@@ -112,7 +112,7 @@ bool CrosMountPointProvider::IsAccessAllowed(const GURL& origin_url,
return false;
return file_access_permissions_->HasAccessPermission(extension_id,
- virtual_path);
+ url.path());
}
// TODO(zelidrag): Share this code with SandboxMountPointProvider impl.

Powered by Google App Engine
This is Rietveld 408576698