OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 | 15 |
16 namespace itunes { | 16 namespace itunes { |
17 class ITunesDataProvider; | 17 class ITunesDataProvider; |
| 18 class ITunesDataProviderTest; |
18 } | 19 } |
19 | 20 |
20 namespace picasa { | 21 namespace picasa { |
21 class PicasaDataProvider; | 22 class PicasaDataProvider; |
22 } | 23 } |
23 | 24 |
24 namespace chrome { | 25 namespace chrome { |
25 | 26 |
26 // This class lives on the MediaTaskRunner thread. It has some static | 27 // This class lives on the MediaTaskRunner thread. It has some static |
27 // methods which are called on the UI thread. | 28 // methods which are called on the UI thread. |
(...skipping 14 matching lines...) Expand all Loading... |
42 bool RevokeImportedFilesystemOnUIThread(const std::string& fsid); | 43 bool RevokeImportedFilesystemOnUIThread(const std::string& fsid); |
43 | 44 |
44 // Should be called on the MediaTaskRunner thread only. | 45 // Should be called on the MediaTaskRunner thread only. |
45 #if defined(OS_WIN) || defined(OS_MACOSX) | 46 #if defined(OS_WIN) || defined(OS_MACOSX) |
46 static picasa::PicasaDataProvider* PicasaDataProvider(); | 47 static picasa::PicasaDataProvider* PicasaDataProvider(); |
47 static itunes::ITunesDataProvider* ITunesDataProvider(); | 48 static itunes::ITunesDataProvider* ITunesDataProvider(); |
48 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 49 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
49 | 50 |
50 private: | 51 private: |
51 friend struct base::DefaultLazyInstanceTraits<ImportedMediaGalleryRegistry>; | 52 friend struct base::DefaultLazyInstanceTraits<ImportedMediaGalleryRegistry>; |
| 53 friend class itunes::ITunesDataProviderTest; |
52 | 54 |
53 ImportedMediaGalleryRegistry(); | 55 ImportedMediaGalleryRegistry(); |
54 virtual ~ImportedMediaGalleryRegistry(); | 56 virtual ~ImportedMediaGalleryRegistry(); |
55 | 57 |
56 #if defined(OS_WIN) || defined(OS_MACOSX) | 58 #if defined(OS_WIN) || defined(OS_MACOSX) |
57 void RegisterPicasaFileSystem(const base::FilePath& database_path); | 59 void RegisterPicasaFileSystem(const base::FilePath& database_path); |
58 void RevokePicasaFileSystem(); | 60 void RevokePicasaFileSystem(); |
59 | 61 |
60 void RegisterITunesFileSystem(const base::FilePath& xml_library_path); | 62 void RegisterITunesFileSystem(const base::FilePath& xml_library_path); |
61 void RevokeITunesFileSystem(); | 63 void RevokeITunesFileSystem(); |
(...skipping 11 matching lines...) Expand all Loading... |
73 base::FilePath itunes_xml_library_path_; | 75 base::FilePath itunes_xml_library_path_; |
74 #endif | 76 #endif |
75 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 77 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
76 | 78 |
77 DISALLOW_COPY_AND_ASSIGN(ImportedMediaGalleryRegistry); | 79 DISALLOW_COPY_AND_ASSIGN(ImportedMediaGalleryRegistry); |
78 }; | 80 }; |
79 | 81 |
80 } // namespace chrome | 82 } // namespace chrome |
81 | 83 |
82 #endif // CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ | 84 #endif // CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ |
OLD | NEW |