| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_NATIVE_MEDIA_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_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 "storage/browser/fileapi/async_file_util.h" | 10 #include "storage/browser/fileapi/async_file_util.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 base::File::Error result, | 39 base::File::Error result, |
| 40 const base::File::Info& file_info, | 40 const base::File::Info& file_info, |
| 41 const base::FilePath& platform_path, | 41 const base::FilePath& platform_path, |
| 42 const scoped_refptr<storage::ShareableFileReference>& file_ref); | 42 const scoped_refptr<storage::ShareableFileReference>& file_ref); |
| 43 | 43 |
| 44 // AsyncFileUtil overrides. | 44 // AsyncFileUtil overrides. |
| 45 virtual void CreateOrOpen( | 45 virtual void CreateOrOpen( |
| 46 scoped_ptr<storage::FileSystemOperationContext> context, | 46 scoped_ptr<storage::FileSystemOperationContext> context, |
| 47 const storage::FileSystemURL& url, | 47 const storage::FileSystemURL& url, |
| 48 int file_flags, | 48 int file_flags, |
| 49 const CreateOrOpenCallback& callback) OVERRIDE; | 49 const CreateOrOpenCallback& callback) override; |
| 50 virtual void EnsureFileExists( | 50 virtual void EnsureFileExists( |
| 51 scoped_ptr<storage::FileSystemOperationContext> context, | 51 scoped_ptr<storage::FileSystemOperationContext> context, |
| 52 const storage::FileSystemURL& url, | 52 const storage::FileSystemURL& url, |
| 53 const EnsureFileExistsCallback& callback) OVERRIDE; | 53 const EnsureFileExistsCallback& callback) override; |
| 54 virtual void CreateDirectory( | 54 virtual void CreateDirectory( |
| 55 scoped_ptr<storage::FileSystemOperationContext> context, | 55 scoped_ptr<storage::FileSystemOperationContext> context, |
| 56 const storage::FileSystemURL& url, | 56 const storage::FileSystemURL& url, |
| 57 bool exclusive, | 57 bool exclusive, |
| 58 bool recursive, | 58 bool recursive, |
| 59 const StatusCallback& callback) OVERRIDE; | 59 const StatusCallback& callback) override; |
| 60 virtual void GetFileInfo( | 60 virtual void GetFileInfo( |
| 61 scoped_ptr<storage::FileSystemOperationContext> context, | 61 scoped_ptr<storage::FileSystemOperationContext> context, |
| 62 const storage::FileSystemURL& url, | 62 const storage::FileSystemURL& url, |
| 63 const GetFileInfoCallback& callback) OVERRIDE; | 63 const GetFileInfoCallback& callback) override; |
| 64 virtual void ReadDirectory( | 64 virtual void ReadDirectory( |
| 65 scoped_ptr<storage::FileSystemOperationContext> context, | 65 scoped_ptr<storage::FileSystemOperationContext> context, |
| 66 const storage::FileSystemURL& url, | 66 const storage::FileSystemURL& url, |
| 67 const ReadDirectoryCallback& callback) OVERRIDE; | 67 const ReadDirectoryCallback& callback) override; |
| 68 virtual void Touch(scoped_ptr<storage::FileSystemOperationContext> context, | 68 virtual void Touch(scoped_ptr<storage::FileSystemOperationContext> context, |
| 69 const storage::FileSystemURL& url, | 69 const storage::FileSystemURL& url, |
| 70 const base::Time& last_access_time, | 70 const base::Time& last_access_time, |
| 71 const base::Time& last_modified_time, | 71 const base::Time& last_modified_time, |
| 72 const StatusCallback& callback) OVERRIDE; | 72 const StatusCallback& callback) override; |
| 73 virtual void Truncate(scoped_ptr<storage::FileSystemOperationContext> context, | 73 virtual void Truncate(scoped_ptr<storage::FileSystemOperationContext> context, |
| 74 const storage::FileSystemURL& url, | 74 const storage::FileSystemURL& url, |
| 75 int64 length, | 75 int64 length, |
| 76 const StatusCallback& callback) OVERRIDE; | 76 const StatusCallback& callback) override; |
| 77 virtual void CopyFileLocal( | 77 virtual void CopyFileLocal( |
| 78 scoped_ptr<storage::FileSystemOperationContext> context, | 78 scoped_ptr<storage::FileSystemOperationContext> context, |
| 79 const storage::FileSystemURL& src_url, | 79 const storage::FileSystemURL& src_url, |
| 80 const storage::FileSystemURL& dest_url, | 80 const storage::FileSystemURL& dest_url, |
| 81 CopyOrMoveOption option, | 81 CopyOrMoveOption option, |
| 82 const CopyFileProgressCallback& progress_callback, | 82 const CopyFileProgressCallback& progress_callback, |
| 83 const StatusCallback& callback) OVERRIDE; | 83 const StatusCallback& callback) override; |
| 84 virtual void MoveFileLocal( | 84 virtual void MoveFileLocal( |
| 85 scoped_ptr<storage::FileSystemOperationContext> context, | 85 scoped_ptr<storage::FileSystemOperationContext> context, |
| 86 const storage::FileSystemURL& src_url, | 86 const storage::FileSystemURL& src_url, |
| 87 const storage::FileSystemURL& dest_url, | 87 const storage::FileSystemURL& dest_url, |
| 88 CopyOrMoveOption option, | 88 CopyOrMoveOption option, |
| 89 const StatusCallback& callback) OVERRIDE; | 89 const StatusCallback& callback) override; |
| 90 virtual void CopyInForeignFile( | 90 virtual void CopyInForeignFile( |
| 91 scoped_ptr<storage::FileSystemOperationContext> context, | 91 scoped_ptr<storage::FileSystemOperationContext> context, |
| 92 const base::FilePath& src_file_path, | 92 const base::FilePath& src_file_path, |
| 93 const storage::FileSystemURL& dest_url, | 93 const storage::FileSystemURL& dest_url, |
| 94 const StatusCallback& callback) OVERRIDE; | 94 const StatusCallback& callback) override; |
| 95 virtual void DeleteFile( | 95 virtual void DeleteFile( |
| 96 scoped_ptr<storage::FileSystemOperationContext> context, | 96 scoped_ptr<storage::FileSystemOperationContext> context, |
| 97 const storage::FileSystemURL& url, | 97 const storage::FileSystemURL& url, |
| 98 const StatusCallback& callback) OVERRIDE; | 98 const StatusCallback& callback) override; |
| 99 virtual void DeleteDirectory( | 99 virtual void DeleteDirectory( |
| 100 scoped_ptr<storage::FileSystemOperationContext> context, | 100 scoped_ptr<storage::FileSystemOperationContext> context, |
| 101 const storage::FileSystemURL& url, | 101 const storage::FileSystemURL& url, |
| 102 const StatusCallback& callback) OVERRIDE; | 102 const StatusCallback& callback) override; |
| 103 virtual void DeleteRecursively( | 103 virtual void DeleteRecursively( |
| 104 scoped_ptr<storage::FileSystemOperationContext> context, | 104 scoped_ptr<storage::FileSystemOperationContext> context, |
| 105 const storage::FileSystemURL& url, | 105 const storage::FileSystemURL& url, |
| 106 const StatusCallback& callback) OVERRIDE; | 106 const StatusCallback& callback) override; |
| 107 virtual void CreateSnapshotFile( | 107 virtual void CreateSnapshotFile( |
| 108 scoped_ptr<storage::FileSystemOperationContext> context, | 108 scoped_ptr<storage::FileSystemOperationContext> context, |
| 109 const storage::FileSystemURL& url, | 109 const storage::FileSystemURL& url, |
| 110 const CreateSnapshotFileCallback& callback) OVERRIDE; | 110 const CreateSnapshotFileCallback& callback) override; |
| 111 | 111 |
| 112 protected: | 112 protected: |
| 113 virtual void CreateDirectoryOnTaskRunnerThread( | 113 virtual void CreateDirectoryOnTaskRunnerThread( |
| 114 scoped_ptr<storage::FileSystemOperationContext> context, | 114 scoped_ptr<storage::FileSystemOperationContext> context, |
| 115 const storage::FileSystemURL& url, | 115 const storage::FileSystemURL& url, |
| 116 bool exclusive, | 116 bool exclusive, |
| 117 bool recursive, | 117 bool recursive, |
| 118 const StatusCallback& callback); | 118 const StatusCallback& callback); |
| 119 virtual void GetFileInfoOnTaskRunnerThread( | 119 virtual void GetFileInfoOnTaskRunnerThread( |
| 120 scoped_ptr<storage::FileSystemOperationContext> context, | 120 scoped_ptr<storage::FileSystemOperationContext> context, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 // Not owned, owned by the backend which owns this. | 224 // Not owned, owned by the backend which owns this. |
| 225 MediaPathFilter* const media_path_filter_; | 225 MediaPathFilter* const media_path_filter_; |
| 226 | 226 |
| 227 base::WeakPtrFactory<NativeMediaFileUtil> weak_factory_; | 227 base::WeakPtrFactory<NativeMediaFileUtil> weak_factory_; |
| 228 | 228 |
| 229 DISALLOW_COPY_AND_ASSIGN(NativeMediaFileUtil); | 229 DISALLOW_COPY_AND_ASSIGN(NativeMediaFileUtil); |
| 230 }; | 230 }; |
| 231 | 231 |
| 232 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ | 232 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ |
| OLD | NEW |