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 33bcbf16a963c378f7352d1d33ab3a4ab6025842..9a8aafb966289a14454ff07d6488728449a6570a 100644 |
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc |
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc |
@@ -89,18 +89,21 @@ FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread( |
bool CrosMountPointProvider::IsAccessAllowed( |
const fileapi::FileSystemURL& url) { |
- if (!CanHandleURL(url)) |
+ if (!url.is_valid()) |
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)) |
return true; |
+ // No extra check is needed for isolated file systems. |
+ if (url.mount_type() == fileapi::kFileSystemTypeIsolated) |
+ return true; |
+ |
+ if (!CanHandleURL(url)) |
+ return false; |
+ |
std::string extension_id = origin_url.host(); |
// Check first to make sure this extension has fileBrowserHander permissions. |
if (!special_storage_policy_->IsFileHandler(extension_id)) |