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

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: Add tests, fix up. 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..3fe22952497baa7704b81fcac6d9028ba9093307 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;
@@ -640,8 +640,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(

Powered by Google App Engine
This is Rietveld 408576698