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 ff5b40183dbadb948f5ef8a3666e9845c952c258..79642c4164597b2424345dedc015d8662e952e6d 100644 |
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc |
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc |
@@ -65,8 +65,8 @@ void CrosMountPointProvider::ValidateFileSystemRoot( |
fileapi::FileSystemType type, |
bool create, |
const ValidateFileSystemCallback& callback) { |
+ DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); |
// Nothing to validate for external filesystem. |
- DCHECK(type == fileapi::kFileSystemTypeExternal); |
callback.Run(base::PLATFORM_FILE_OK); |
} |
@@ -75,7 +75,7 @@ FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread( |
fileapi::FileSystemType type, |
const FilePath& virtual_path, |
bool create) { |
- DCHECK(type == fileapi::kFileSystemTypeExternal); |
+ DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); |
fileapi::FileSystemURL url(origin_url, type, virtual_path); |
if (!url.is_valid()) |
return FilePath(); |
@@ -89,12 +89,13 @@ FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread( |
bool CrosMountPointProvider::IsAccessAllowed( |
const fileapi::FileSystemURL& url) { |
- // TODO(kinuko): this should call CanHandleURL() once |
- // http://crbug.com/142267 is fixed. |
- if (url.type() != fileapi::kFileSystemTypeNativeLocal && |
- url.type() != fileapi::kFileSystemTypeDrive) |
+ if (!CanHandleURL(url)) |
return false; |
+ // No extra check is needed for isolated file systems. |
+ if (url.mount_type() == fileapi::kFileSystemTypeIsolated) |
+ return true; |
+ |
// Permit access to mount points from internal WebUI. |
const GURL& origin_url = url.origin(); |
if (origin_url.SchemeIs(kChromeUIScheme)) |