diff options
Diffstat (limited to 'chrome/browser/media_galleries/imported_media_gallery_registry.cc')
-rw-r--r-- | chrome/browser/media_galleries/imported_media_gallery_registry.cc | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/chrome/browser/media_galleries/imported_media_gallery_registry.cc b/chrome/browser/media_galleries/imported_media_gallery_registry.cc index abbf8c8..211e8b8 100644 --- a/chrome/browser/media_galleries/imported_media_gallery_registry.cc +++ b/chrome/browser/media_galleries/imported_media_gallery_registry.cc @@ -8,7 +8,6 @@ #include "base/files/file_util.h" #include "base/logging.h" #include "build/build_config.h" -#include "chrome/browser/media_galleries/fileapi/iphoto_data_provider.h" #include "chrome/browser/media_galleries/fileapi/itunes_data_provider.h" #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" #include "chrome/browser/media_galleries/fileapi/picasa_data_provider.h" @@ -118,45 +117,6 @@ bool ImportedMediaGalleryRegistry::RegisterITunesFilesystemOnUIThread( return result; } -bool ImportedMediaGalleryRegistry::RegisterIPhotoFilesystemOnUIThread( - const std::string& fs_name, const base::FilePath& library_xml_path) { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - DCHECK(!library_xml_path.empty()); - - bool result = false; - - // TODO(gbillock): Investigate how to refactor this to reduce duplicated - // code. -#if defined(OS_MACOSX) - base::FilePath root = ImportedRoot(); - if (root.empty()) - return false; - result = ExternalMountPoints::GetSystemInstance()->RegisterFileSystem( - fs_name, - storage::kFileSystemTypeIphoto, - storage::FileSystemMountOption(), - root.AppendASCII("iphoto")); - if (!result) - return result; - - iphoto_fs_names_.insert(fs_name); - - if (iphoto_fs_names_.size() == 1) { - MediaFileSystemBackend::MediaTaskRunner()->PostTask( - FROM_HERE, - Bind(&ImportedMediaGalleryRegistry::RegisterIPhotoFileSystem, - base::Unretained(this), library_xml_path)); -#ifndef NDEBUG - iphoto_xml_library_path_ = library_xml_path; - } else { - DCHECK_EQ(iphoto_xml_library_path_.value(), library_xml_path.value()); -#endif - } -#endif // defined(OS_MACOSX) - - return result; -} - bool ImportedMediaGalleryRegistry::RevokeImportedFilesystemOnUIThread( const std::string& fs_name) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -183,18 +143,6 @@ bool ImportedMediaGalleryRegistry::RevokeImportedFilesystemOnUIThread( } #endif // defined(OS_WIN) || defined(OS_MACOSX) -#if defined(OS_MACOSX) - if (iphoto_fs_names_.erase(fs_name)) { - if (iphoto_fs_names_.empty()) { - MediaFileSystemBackend::MediaTaskRunner()->PostTask( - FROM_HERE, - Bind(&ImportedMediaGalleryRegistry::RevokeIPhotoFileSystem, - base::Unretained(this))); - } - return ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(fs_name); - } -#endif // defined(OS_MACOSX) - return false; } @@ -221,16 +169,6 @@ ImportedMediaGalleryRegistry::ITunesDataProvider() { } #endif // defined(OS_WIN) || defined(OS_MACOSX) -#if defined(OS_MACOSX) -// static -iphoto::IPhotoDataProvider* -ImportedMediaGalleryRegistry::IPhotoDataProvider() { - DCHECK(MediaFileSystemBackend::CurrentlyOnMediaTaskRunnerThread()); - DCHECK(GetInstance()->iphoto_data_provider_); - return GetInstance()->iphoto_data_provider_.get(); -} -#endif // defined(OS_MACOSX) - ImportedMediaGalleryRegistry::ImportedMediaGalleryRegistry() {} ImportedMediaGalleryRegistry::~ImportedMediaGalleryRegistry() { @@ -240,9 +178,6 @@ ImportedMediaGalleryRegistry::~ImportedMediaGalleryRegistry() { DCHECK_EQ(0U, picasa_fs_names_.size()); DCHECK_EQ(0U, itunes_fs_names_.size()); #endif // defined(OS_WIN) || defined(OS_MACOSX) -#if defined(OS_MACOSX) - DCHECK_EQ(0U, iphoto_fs_names_.size()); -#endif // defined(OS_MACOSX) } #if defined(OS_WIN) || defined(OS_MACOSX) @@ -273,17 +208,3 @@ void ImportedMediaGalleryRegistry::RevokeITunesFileSystem() { } #endif // defined(OS_WIN) || defined(OS_MACOSX) -#if defined(OS_MACOSX) -void ImportedMediaGalleryRegistry::RegisterIPhotoFileSystem( - const base::FilePath& xml_library_path) { - DCHECK(MediaFileSystemBackend::CurrentlyOnMediaTaskRunnerThread()); - DCHECK(!iphoto_data_provider_); - iphoto_data_provider_.reset(new iphoto::IPhotoDataProvider(xml_library_path)); -} - -void ImportedMediaGalleryRegistry::RevokeIPhotoFileSystem() { - DCHECK(MediaFileSystemBackend::CurrentlyOnMediaTaskRunnerThread()); - DCHECK(iphoto_data_provider_); - iphoto_data_provider_.reset(); -} -#endif // defined(OS_MACOSX) |