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

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

Issue 15511009: Picasa import: MediaFileSystemRegistry and misc. plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0021-picasa-import-add-picasa-finder-to-preferences
Patch Set: Address vandebo commenst. Created 7 years, 7 months 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_galleries/media_file_system_registry.cc
diff --git a/chrome/browser/media_galleries/media_file_system_registry.cc b/chrome/browser/media_galleries/media_file_system_registry.cc
index 200b4f31a3647d81cc823b1e590cdf6b3c7c6414..da1de0d59c4273c71c9b78b7a703428683c7139d 100644
--- a/chrome/browser/media_galleries/media_file_system_registry.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry.cc
@@ -16,6 +16,7 @@
#include "base/stl_util.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/media_galleries/imported_media_gallery_registry.h"
#include "chrome/browser/media_galleries/media_file_system_context.h"
#include "chrome/browser/media_galleries/media_galleries_dialog_controller.h"
#include "chrome/browser/media_galleries/media_galleries_preferences_factory.h"
@@ -576,9 +577,24 @@ class MediaFileSystemRegistry::MediaFileSystemContextImpl
CHECK(path.IsAbsolute());
CHECK(!path.ReferencesParent());
std::string fs_name(extension_misc::kMediaFileSystemPathPart);
- const std::string fsid =
- IsolatedContext::GetInstance()->RegisterFileSystemForPath(
+
+ StorageInfo::Type type;
+ CHECK(StorageInfo::CrackDeviceId(device_id, &type, NULL));
vandebo (ex-Chrome) 2013/05/22 18:21:48 We should probably leave this abstraction intact.
+
+ std::string fsid;
+ switch (type) {
+ case StorageInfo::ITUNES:
+ NOTIMPLEMENTED();
+ break;
+ case StorageInfo::PICASA:
+ fsid = ImportedMediaGalleryRegistry::RegisterPicasaFilesystemOnUIThread(
+ path);
+ break;
+ default:
+ fsid = IsolatedContext::GetInstance()->RegisterFileSystemForPath(
fileapi::kFileSystemTypeNativeMedia, path, &fs_name);
+ break;
+ }
CHECK(!fsid.empty());
return fsid;
}
« no previous file with comments | « chrome/browser/media_galleries/fileapi/picasa/picasa_file_util.cc ('k') | content/browser/fileapi/fileapi_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698