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

Unified Diff: chrome/browser/media_galleries/imported_media_gallery_registry.h

Issue 16158004: iTunes file util and data provider for media galleries (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo incorrect fix Created 7 years, 6 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/imported_media_gallery_registry.h
diff --git a/chrome/browser/media_galleries/imported_media_gallery_registry.h b/chrome/browser/media_galleries/imported_media_gallery_registry.h
index 2b62f7e57ddfd3b0737f375dac5944f2a3e0c004..d8f0e697c64412df0fb657c1c183ee780ac39ce7 100644
--- a/chrome/browser/media_galleries/imported_media_gallery_registry.h
+++ b/chrome/browser/media_galleries/imported_media_gallery_registry.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_
#define CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_
+#include <set>
#include <string>
#include "base/basictypes.h"
@@ -12,6 +13,10 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
+namespace itunes {
+class ITunesDataProvider;
+}
+
namespace picasa {
class PicasaDataProvider;
}
@@ -28,12 +33,17 @@ class ImportedMediaGalleryRegistry {
static ImportedMediaGalleryRegistry* GetInstance();
// Should be called on the UI thread only.
- static std::string RegisterPicasaFilesystemOnUIThread(
+ std::string RegisterPicasaFilesystemOnUIThread(
const base::FilePath& database_path);
- static bool RevokePicasaFilesystemOnUIThread(const std::string& fsid);
+
+ std::string RegisterITunesFilesystemOnUIThread(
+ const base::FilePath& xml_library_path);
+
+ bool RevokeImportedFilesystemOnUIThread(const std::string& fsid);
// Should be called on the MediaTaskRunner thread only.
- static picasa::PicasaDataProvider* picasa_data_provider();
+ static picasa::PicasaDataProvider* PicasaDataProvider();
+ static itunes::ITunesDataProvider* ITunesDataProvider();
private:
friend struct base::DefaultLazyInstanceTraits<ImportedMediaGalleryRegistry>;
@@ -44,9 +54,21 @@ class ImportedMediaGalleryRegistry {
void RegisterPicasaFileSystem(const base::FilePath& database_path);
void RevokePicasaFileSystem();
+ void RegisterITunesFileSystem(const base::FilePath& xml_library_path);
+ void RevokeITunesFileSystem();
+
+ // The data providers are only set or accessed on the task runner thread.
scoped_ptr<picasa::PicasaDataProvider> picasa_data_provider_;
+ scoped_ptr<itunes::ITunesDataProvider> itunes_data_provider_;
+
+ // The remaining members are only accessed on the IO thread.
tommycli 2013/06/10 17:33:25 Nice. This is better.
+ std::set<std::string> picasa_fsids_;
+ std::set<std::string> itunes_fsids_;
- int picasa_filesystems_count_;
+#ifndef NDEBUG
+ base::FilePath picasa_database_path_;
+ base::FilePath itunes_xml_library_path_;
+#endif
DISALLOW_COPY_AND_ASSIGN(ImportedMediaGalleryRegistry);
};

Powered by Google App Engine
This is Rietveld 408576698