Chromium Code Reviews| 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..bd85cedb0fa456eddceb0a0e259952c754a416ea 100644 |
| --- a/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc |
| +++ b/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc |
| @@ -54,4 +54,12 @@ void FindITunesLibrary(const IAppsFinderCallback& callback) { |
| } |
| #endif |
| +bool PathWithinIAppsLibrary(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) || library_root.IsParent(path); |
|
vandebo (ex-Chrome)
2014/06/10 21:57:17
Probably don't want to be this generic... iTunes i
tommycli
2014/06/10 23:59:06
Done.
|
| +} |
| + |
| } // namespace iapps |