Index: chrome/browser/media_gallery/media_file_system_registry.cc |
diff --git a/chrome/browser/media_gallery/media_file_system_registry.cc b/chrome/browser/media_gallery/media_file_system_registry.cc |
index 07dbfba9a1f8c97fbd5bc1c257411bfb3248f385..062388300a09bbd5ac61e0918bee65b92042ed32 100644 |
--- a/chrome/browser/media_gallery/media_file_system_registry.cc |
+++ b/chrome/browser/media_gallery/media_file_system_registry.cc |
@@ -256,7 +256,7 @@ class ExtensionGalleriesHost |
} |
FilePath path = gallery_info.AbsolutePath(); |
- if (!path.IsAbsolute()) |
+ if (!MediaStorageUtil::CanCreateFileSystem(device_id, path)) |
continue; |
std::string fsid; |
@@ -602,8 +602,7 @@ class MediaFileSystemRegistry::MediaFileSystemContextImpl |
DCHECK(!MediaStorageUtil::IsMassStorageDevice(device_id)); |
// Sanity checks for |path|. |
- CHECK(path.IsAbsolute()); |
- CHECK(!path.ReferencesParent()); |
+ CHECK(MediaStorageUtil::CanCreateFileSystem(device_id, path)); |
std::string fs_name(extension_misc::kMediaFileSystemPathPart); |
const std::string fsid = |
IsolatedContext::GetInstance()->RegisterFileSystemForPath( |