| 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 STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ |
| 6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ | 6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // The default implementation of FileSystemOperation for file systems. | 27 // The default implementation of FileSystemOperation for file systems. |
| 28 class STORAGE_EXPORT FileSystemOperationImpl | 28 class STORAGE_EXPORT FileSystemOperationImpl |
| 29 : public NON_EXPORTED_BASE(FileSystemOperation) { | 29 : public NON_EXPORTED_BASE(FileSystemOperation) { |
| 30 public: | 30 public: |
| 31 virtual ~FileSystemOperationImpl(); | 31 virtual ~FileSystemOperationImpl(); |
| 32 | 32 |
| 33 // FileSystemOperation overrides. | 33 // FileSystemOperation overrides. |
| 34 virtual void CreateFile(const FileSystemURL& url, | 34 virtual void CreateFile(const FileSystemURL& url, |
| 35 bool exclusive, | 35 bool exclusive, |
| 36 const StatusCallback& callback) OVERRIDE; | 36 const StatusCallback& callback) override; |
| 37 virtual void CreateDirectory(const FileSystemURL& url, | 37 virtual void CreateDirectory(const FileSystemURL& url, |
| 38 bool exclusive, | 38 bool exclusive, |
| 39 bool recursive, | 39 bool recursive, |
| 40 const StatusCallback& callback) OVERRIDE; | 40 const StatusCallback& callback) override; |
| 41 virtual void Copy(const FileSystemURL& src_url, | 41 virtual void Copy(const FileSystemURL& src_url, |
| 42 const FileSystemURL& dest_url, | 42 const FileSystemURL& dest_url, |
| 43 CopyOrMoveOption option, | 43 CopyOrMoveOption option, |
| 44 const CopyProgressCallback& progress_callback, | 44 const CopyProgressCallback& progress_callback, |
| 45 const StatusCallback& callback) OVERRIDE; | 45 const StatusCallback& callback) override; |
| 46 virtual void Move(const FileSystemURL& src_url, | 46 virtual void Move(const FileSystemURL& src_url, |
| 47 const FileSystemURL& dest_url, | 47 const FileSystemURL& dest_url, |
| 48 CopyOrMoveOption option, | 48 CopyOrMoveOption option, |
| 49 const StatusCallback& callback) OVERRIDE; | 49 const StatusCallback& callback) override; |
| 50 virtual void DirectoryExists(const FileSystemURL& url, | 50 virtual void DirectoryExists(const FileSystemURL& url, |
| 51 const StatusCallback& callback) OVERRIDE; | 51 const StatusCallback& callback) override; |
| 52 virtual void FileExists(const FileSystemURL& url, | 52 virtual void FileExists(const FileSystemURL& url, |
| 53 const StatusCallback& callback) OVERRIDE; | 53 const StatusCallback& callback) override; |
| 54 virtual void GetMetadata(const FileSystemURL& url, | 54 virtual void GetMetadata(const FileSystemURL& url, |
| 55 const GetMetadataCallback& callback) OVERRIDE; | 55 const GetMetadataCallback& callback) override; |
| 56 virtual void ReadDirectory(const FileSystemURL& url, | 56 virtual void ReadDirectory(const FileSystemURL& url, |
| 57 const ReadDirectoryCallback& callback) OVERRIDE; | 57 const ReadDirectoryCallback& callback) override; |
| 58 virtual void Remove(const FileSystemURL& url, bool recursive, | 58 virtual void Remove(const FileSystemURL& url, bool recursive, |
| 59 const StatusCallback& callback) OVERRIDE; | 59 const StatusCallback& callback) override; |
| 60 virtual void Write(const FileSystemURL& url, | 60 virtual void Write(const FileSystemURL& url, |
| 61 scoped_ptr<FileWriterDelegate> writer_delegate, | 61 scoped_ptr<FileWriterDelegate> writer_delegate, |
| 62 scoped_ptr<net::URLRequest> blob_request, | 62 scoped_ptr<net::URLRequest> blob_request, |
| 63 const WriteCallback& callback) OVERRIDE; | 63 const WriteCallback& callback) override; |
| 64 virtual void Truncate(const FileSystemURL& url, int64 length, | 64 virtual void Truncate(const FileSystemURL& url, int64 length, |
| 65 const StatusCallback& callback) OVERRIDE; | 65 const StatusCallback& callback) override; |
| 66 virtual void TouchFile(const FileSystemURL& url, | 66 virtual void TouchFile(const FileSystemURL& url, |
| 67 const base::Time& last_access_time, | 67 const base::Time& last_access_time, |
| 68 const base::Time& last_modified_time, | 68 const base::Time& last_modified_time, |
| 69 const StatusCallback& callback) OVERRIDE; | 69 const StatusCallback& callback) override; |
| 70 virtual void OpenFile(const FileSystemURL& url, | 70 virtual void OpenFile(const FileSystemURL& url, |
| 71 int file_flags, | 71 int file_flags, |
| 72 const OpenFileCallback& callback) OVERRIDE; | 72 const OpenFileCallback& callback) override; |
| 73 virtual void Cancel(const StatusCallback& cancel_callback) OVERRIDE; | 73 virtual void Cancel(const StatusCallback& cancel_callback) override; |
| 74 virtual void CreateSnapshotFile( | 74 virtual void CreateSnapshotFile( |
| 75 const FileSystemURL& path, | 75 const FileSystemURL& path, |
| 76 const SnapshotFileCallback& callback) OVERRIDE; | 76 const SnapshotFileCallback& callback) override; |
| 77 virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path, | 77 virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path, |
| 78 const FileSystemURL& dest_url, | 78 const FileSystemURL& dest_url, |
| 79 const StatusCallback& callback) OVERRIDE; | 79 const StatusCallback& callback) override; |
| 80 virtual void RemoveFile(const FileSystemURL& url, | 80 virtual void RemoveFile(const FileSystemURL& url, |
| 81 const StatusCallback& callback) OVERRIDE; | 81 const StatusCallback& callback) override; |
| 82 virtual void RemoveDirectory(const FileSystemURL& url, | 82 virtual void RemoveDirectory(const FileSystemURL& url, |
| 83 const StatusCallback& callback) OVERRIDE; | 83 const StatusCallback& callback) override; |
| 84 virtual void CopyFileLocal(const FileSystemURL& src_url, | 84 virtual void CopyFileLocal(const FileSystemURL& src_url, |
| 85 const FileSystemURL& dest_url, | 85 const FileSystemURL& dest_url, |
| 86 CopyOrMoveOption option, | 86 CopyOrMoveOption option, |
| 87 const CopyFileProgressCallback& progress_callback, | 87 const CopyFileProgressCallback& progress_callback, |
| 88 const StatusCallback& callback) OVERRIDE; | 88 const StatusCallback& callback) override; |
| 89 virtual void MoveFileLocal(const FileSystemURL& src_url, | 89 virtual void MoveFileLocal(const FileSystemURL& src_url, |
| 90 const FileSystemURL& dest_url, | 90 const FileSystemURL& dest_url, |
| 91 CopyOrMoveOption option, | 91 CopyOrMoveOption option, |
| 92 const StatusCallback& callback) OVERRIDE; | 92 const StatusCallback& callback) override; |
| 93 virtual base::File::Error SyncGetPlatformPath( | 93 virtual base::File::Error SyncGetPlatformPath( |
| 94 const FileSystemURL& url, | 94 const FileSystemURL& url, |
| 95 base::FilePath* platform_path) OVERRIDE; | 95 base::FilePath* platform_path) override; |
| 96 | 96 |
| 97 FileSystemContext* file_system_context() const { | 97 FileSystemContext* file_system_context() const { |
| 98 return file_system_context_.get(); | 98 return file_system_context_.get(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 friend class FileSystemOperation; | 102 friend class FileSystemOperation; |
| 103 | 103 |
| 104 FileSystemOperationImpl( | 104 FileSystemOperationImpl( |
| 105 const FileSystemURL& url, | 105 const FileSystemURL& url, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 OperationType pending_operation_; | 197 OperationType pending_operation_; |
| 198 | 198 |
| 199 base::WeakPtrFactory<FileSystemOperationImpl> weak_factory_; | 199 base::WeakPtrFactory<FileSystemOperationImpl> weak_factory_; |
| 200 | 200 |
| 201 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl); | 201 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 } // namespace storage | 204 } // namespace storage |
| 205 | 205 |
| 206 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ | 206 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ |
| OLD | NEW |