| Index: chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc
|
| diff --git a/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc b/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc
|
| index 8adc508175af482d39227b21ba077d7b6caee513..abf032173f832b5760e15725288675f66dca8ec0 100644
|
| --- a/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc
|
| +++ b/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc
|
| @@ -54,4 +54,25 @@ void FindITunesLibrary(const IAppsFinderCallback& callback) {
|
| }
|
| #endif
|
|
|
| +bool PathIndicatesIPhotoLibrary(const std::string& unique_id,
|
| + const base::FilePath& path) {
|
| + // |unique_id| is the path to the library XML file at the library root.
|
| + base::FilePath library_root =
|
| + base::FilePath::FromUTF8Unsafe(unique_id).DirName();
|
| + return (path == library_root) ||
|
| + (path == library_root.AppendASCII("Data")) ||
|
| + (path == library_root.AppendASCII("Originals")) ||
|
| + (path == library_root.AppendASCII("Masters"));
|
| +}
|
| +
|
| +bool PathIndicatesITunesLibrary(const std::string& unique_id,
|
| + const base::FilePath& path) {
|
| + // |unique_id| is the path to the library XML file at the library root.
|
| + base::FilePath library_root =
|
| + base::FilePath::FromUTF8Unsafe(unique_id).DirName();
|
| + return (path == library_root) ||
|
| + (path == library_root.AppendASCII("iTunes Media")) ||
|
| + (path == library_root.AppendASCII("iTunes Media").AppendASCII("Music"));
|
| +}
|
| +
|
| } // namespace iapps
|
|
|