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

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: Restore changes and remove todo 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..517ed0e1ab14807a510b2d79d0110c1604abafb1 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,18 @@ class MediaFileSystemRegistry::MediaFileSystemContextImpl
CHECK(path.IsAbsolute());
CHECK(!path.ReferencesParent());
std::string fs_name(extension_misc::kMediaFileSystemPathPart);
- const std::string fsid =
- IsolatedContext::GetInstance()->RegisterFileSystemForPath(
- fileapi::kFileSystemTypeNativeMedia, path, &fs_name);
+
+ std::string fsid;
+ if (StorageInfo::IsITunesDevice(device_id)) {
+ NOTIMPLEMENTED();
+ } else if (StorageInfo::IsPicasaDevice(device_id)) {
+ fsid = ImportedMediaGalleryRegistry::RegisterPicasaFilesystemOnUIThread(
+ path);
+ } else {
+ fsid = IsolatedContext::GetInstance()->RegisterFileSystemForPath(
+ fileapi::kFileSystemTypeNativeMedia, path, &fs_name);
+ }
+
CHECK(!fsid.empty());
return fsid;
}
« no previous file with comments | « chrome/browser/media_galleries/fileapi/picasa/picasa_file_util.cc ('k') | chrome/browser/storage_monitor/storage_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698