| 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_FILEAPI_IPHOTO_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_FILE_UTIL_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" | 10 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // |- /AnotherAlbum | 25 // |- /AnotherAlbum |
| 26 // |- pic3.jpg | 26 // |- pic3.jpg |
| 27 // |- /originals = A directory for originals. | 27 // |- /originals = A directory for originals. |
| 28 // |- pic3.jpg = Original picture. Same name as album photo. | 28 // |- pic3.jpg = Original picture. Same name as album photo. |
| 29 | 29 |
| 30 extern const char kIPhotoAlbumsDir[]; | 30 extern const char kIPhotoAlbumsDir[]; |
| 31 | 31 |
| 32 class IPhotoFileUtil : public NativeMediaFileUtil { | 32 class IPhotoFileUtil : public NativeMediaFileUtil { |
| 33 public: | 33 public: |
| 34 explicit IPhotoFileUtil(MediaPathFilter* media_path_filter); | 34 explicit IPhotoFileUtil(MediaPathFilter* media_path_filter); |
| 35 virtual ~IPhotoFileUtil(); | 35 ~IPhotoFileUtil() override; |
| 36 | 36 |
| 37 protected: | 37 protected: |
| 38 // NativeMediaFileUtil overrides. | 38 // NativeMediaFileUtil overrides. |
| 39 virtual void GetFileInfoOnTaskRunnerThread( | 39 void GetFileInfoOnTaskRunnerThread( |
| 40 scoped_ptr<storage::FileSystemOperationContext> context, | 40 scoped_ptr<storage::FileSystemOperationContext> context, |
| 41 const storage::FileSystemURL& url, | 41 const storage::FileSystemURL& url, |
| 42 const GetFileInfoCallback& callback) override; | 42 const GetFileInfoCallback& callback) override; |
| 43 virtual void ReadDirectoryOnTaskRunnerThread( | 43 void ReadDirectoryOnTaskRunnerThread( |
| 44 scoped_ptr<storage::FileSystemOperationContext> context, | 44 scoped_ptr<storage::FileSystemOperationContext> context, |
| 45 const storage::FileSystemURL& url, | 45 const storage::FileSystemURL& url, |
| 46 const ReadDirectoryCallback& callback) override; | 46 const ReadDirectoryCallback& callback) override; |
| 47 virtual void CreateSnapshotFileOnTaskRunnerThread( | 47 void CreateSnapshotFileOnTaskRunnerThread( |
| 48 scoped_ptr<storage::FileSystemOperationContext> context, | 48 scoped_ptr<storage::FileSystemOperationContext> context, |
| 49 const storage::FileSystemURL& url, | 49 const storage::FileSystemURL& url, |
| 50 const CreateSnapshotFileCallback& callback) override; | 50 const CreateSnapshotFileCallback& callback) override; |
| 51 virtual base::File::Error GetFileInfoSync( | 51 base::File::Error GetFileInfoSync( |
| 52 storage::FileSystemOperationContext* context, | 52 storage::FileSystemOperationContext* context, |
| 53 const storage::FileSystemURL& url, | 53 const storage::FileSystemURL& url, |
| 54 base::File::Info* file_info, | 54 base::File::Info* file_info, |
| 55 base::FilePath* platform_path) override; | 55 base::FilePath* platform_path) override; |
| 56 virtual base::File::Error ReadDirectorySync( | 56 base::File::Error ReadDirectorySync( |
| 57 storage::FileSystemOperationContext* context, | 57 storage::FileSystemOperationContext* context, |
| 58 const storage::FileSystemURL& url, | 58 const storage::FileSystemURL& url, |
| 59 EntryList* file_list) override; | 59 EntryList* file_list) override; |
| 60 virtual base::File::Error DeleteDirectorySync( | 60 base::File::Error DeleteDirectorySync( |
| 61 storage::FileSystemOperationContext* context, | 61 storage::FileSystemOperationContext* context, |
| 62 const storage::FileSystemURL& url) override; | 62 const storage::FileSystemURL& url) override; |
| 63 virtual base::File::Error DeleteFileSync( | 63 base::File::Error DeleteFileSync(storage::FileSystemOperationContext* context, |
| 64 storage::FileSystemOperationContext* context, | 64 const storage::FileSystemURL& url) override; |
| 65 const storage::FileSystemURL& url) override; | 65 base::File::Error GetLocalFilePath( |
| 66 virtual base::File::Error GetLocalFilePath( | |
| 67 storage::FileSystemOperationContext* context, | 66 storage::FileSystemOperationContext* context, |
| 68 const storage::FileSystemURL& url, | 67 const storage::FileSystemURL& url, |
| 69 base::FilePath* local_file_path) override; | 68 base::FilePath* local_file_path) override; |
| 70 | 69 |
| 71 private: | 70 private: |
| 72 void GetFileInfoWithFreshDataProvider( | 71 void GetFileInfoWithFreshDataProvider( |
| 73 scoped_ptr<storage::FileSystemOperationContext> context, | 72 scoped_ptr<storage::FileSystemOperationContext> context, |
| 74 const storage::FileSystemURL& url, | 73 const storage::FileSystemURL& url, |
| 75 const GetFileInfoCallback& callback, | 74 const GetFileInfoCallback& callback, |
| 76 bool valid_parse); | 75 bool valid_parse); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 90 base::WeakPtrFactory<IPhotoFileUtil> weak_factory_; | 89 base::WeakPtrFactory<IPhotoFileUtil> weak_factory_; |
| 91 | 90 |
| 92 ImportedMediaGalleryRegistry* imported_registry_; | 91 ImportedMediaGalleryRegistry* imported_registry_; |
| 93 | 92 |
| 94 DISALLOW_COPY_AND_ASSIGN(IPhotoFileUtil); | 93 DISALLOW_COPY_AND_ASSIGN(IPhotoFileUtil); |
| 95 }; | 94 }; |
| 96 | 95 |
| 97 } // namespace iphoto | 96 } // namespace iphoto |
| 98 | 97 |
| 99 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_FILE_UTIL_H_ | 98 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_FILE_UTIL_H_ |
| OLD | NEW |