Chromium Code Reviews| 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 69d247fd2603978b9d512d849b3a681ac9ee864d..9f72db58929b5a0c107cee2644555b81a7a0f6fa 100644 |
| --- a/chrome/browser/media_gallery/media_file_system_registry.cc |
| +++ b/chrome/browser/media_gallery/media_file_system_registry.cc |
| @@ -335,7 +335,7 @@ class ExtensionGalleriesHost |
| } |
| FilePath path = gallery_info.AbsolutePath(); |
| - if (!path.IsAbsolute()) |
| + if (!MediaStorageUtil::CanCreateFileSystem(device_id, path)) |
| continue; |
| std::string fsid; |
| @@ -344,6 +344,7 @@ class ExtensionGalleriesHost |
| device_id, path); |
| } else { |
| #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) |
| + LOG(INFO) << "Getting MTP fs for " << path.value(); |
|
Lei Zhang
2012/12/10 21:53:41
Remove these debugging statements?
Greg Billock
2012/12/10 22:39:41
Done.
|
| scoped_refptr<ScopedMTPDeviceMapEntry> mtp_device_host; |
| fsid = file_system_context_->RegisterFileSystemForMTPDevice( |
| device_id, path, &mtp_device_host); |
| @@ -640,12 +641,12 @@ 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( |
| fileapi::kFileSystemTypeDeviceMedia, path, &fs_name); |
| + LOG(INFO) << "Registered for type device-media : " << path.value(); |
| CHECK(!fsid.empty()); |
| DCHECK(entry); |
| *entry = registry_->GetOrCreateScopedMTPDeviceMapEntry(path.value()); |