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

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: Rebase 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..6946ecb65eebde2f02ae7609b3cbbab45dad9349 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -87,16 +87,15 @@ 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& ur) {
kinuko 2012/08/24 10:17:44 typo: ur -> url
calvinlo 2012/08/25 13:18:10 Done.
// 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 +105,7 @@ bool CrosMountPointProvider::IsAccessAllowed(const GURL& origin_url,
return false;
return file_access_permissions_->HasAccessPermission(extension_id,
- virtual_path);
+ url.path());
kinuko 2012/08/24 10:17:44 url.path() -> url.virtual_path()
calvinlo 2012/08/25 13:18:10 Fixed. Sorry I should have looked at the diff more
}
// TODO(zelidrag): Share this code with SandboxMountPointProvider impl.
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.h ('k') | webkit/fileapi/file_system_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698