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

Unified Diff: chrome/browser/media_gallery/media_file_system_registry.cc

Issue 11490010: [Media Galleries] Introduce a new type for Mac Image Capture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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: 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());
« no previous file with comments | « no previous file | chrome/browser/system_monitor/disk_info_mac.h » ('j') | chrome/browser/system_monitor/disk_info_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698