| 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_SYNC_FILE_SYSTEM_LOCAL_SYNCABLE_FILE_SYSTEM_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNCABLE_FILE_SYSTEM_OPERATION_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNCABLE_FILE_SYSTEM_OPERATION_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNCABLE_FILE_SYSTEM_OPERATION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // A wrapper class of FileSystemOperation for syncable file system. | 27 // A wrapper class of FileSystemOperation for syncable file system. |
| 28 class SyncableFileSystemOperation | 28 class SyncableFileSystemOperation |
| 29 : public NON_EXPORTED_BASE(storage::FileSystemOperation), | 29 : public NON_EXPORTED_BASE(storage::FileSystemOperation), |
| 30 public base::NonThreadSafe { | 30 public base::NonThreadSafe { |
| 31 public: | 31 public: |
| 32 virtual ~SyncableFileSystemOperation(); | 32 virtual ~SyncableFileSystemOperation(); |
| 33 | 33 |
| 34 // storage::FileSystemOperation overrides. | 34 // storage::FileSystemOperation overrides. |
| 35 virtual void CreateFile(const storage::FileSystemURL& url, | 35 virtual void CreateFile(const storage::FileSystemURL& url, |
| 36 bool exclusive, | 36 bool exclusive, |
| 37 const StatusCallback& callback) OVERRIDE; | 37 const StatusCallback& callback) override; |
| 38 virtual void CreateDirectory(const storage::FileSystemURL& url, | 38 virtual void CreateDirectory(const storage::FileSystemURL& url, |
| 39 bool exclusive, | 39 bool exclusive, |
| 40 bool recursive, | 40 bool recursive, |
| 41 const StatusCallback& callback) OVERRIDE; | 41 const StatusCallback& callback) override; |
| 42 virtual void Copy(const storage::FileSystemURL& src_url, | 42 virtual void Copy(const storage::FileSystemURL& src_url, |
| 43 const storage::FileSystemURL& dest_url, | 43 const storage::FileSystemURL& dest_url, |
| 44 CopyOrMoveOption option, | 44 CopyOrMoveOption option, |
| 45 const CopyProgressCallback& progress_callback, | 45 const CopyProgressCallback& progress_callback, |
| 46 const StatusCallback& callback) OVERRIDE; | 46 const StatusCallback& callback) override; |
| 47 virtual void Move(const storage::FileSystemURL& src_url, | 47 virtual void Move(const storage::FileSystemURL& src_url, |
| 48 const storage::FileSystemURL& dest_url, | 48 const storage::FileSystemURL& dest_url, |
| 49 CopyOrMoveOption option, | 49 CopyOrMoveOption option, |
| 50 const StatusCallback& callback) OVERRIDE; | 50 const StatusCallback& callback) override; |
| 51 virtual void DirectoryExists(const storage::FileSystemURL& url, | 51 virtual void DirectoryExists(const storage::FileSystemURL& url, |
| 52 const StatusCallback& callback) OVERRIDE; | 52 const StatusCallback& callback) override; |
| 53 virtual void FileExists(const storage::FileSystemURL& url, | 53 virtual void FileExists(const storage::FileSystemURL& url, |
| 54 const StatusCallback& callback) OVERRIDE; | 54 const StatusCallback& callback) override; |
| 55 virtual void GetMetadata(const storage::FileSystemURL& url, | 55 virtual void GetMetadata(const storage::FileSystemURL& url, |
| 56 const GetMetadataCallback& callback) OVERRIDE; | 56 const GetMetadataCallback& callback) override; |
| 57 virtual void ReadDirectory(const storage::FileSystemURL& url, | 57 virtual void ReadDirectory(const storage::FileSystemURL& url, |
| 58 const ReadDirectoryCallback& callback) OVERRIDE; | 58 const ReadDirectoryCallback& callback) override; |
| 59 virtual void Remove(const storage::FileSystemURL& url, | 59 virtual void Remove(const storage::FileSystemURL& url, |
| 60 bool recursive, | 60 bool recursive, |
| 61 const StatusCallback& callback) OVERRIDE; | 61 const StatusCallback& callback) override; |
| 62 virtual void Write(const storage::FileSystemURL& url, | 62 virtual void Write(const storage::FileSystemURL& url, |
| 63 scoped_ptr<storage::FileWriterDelegate> writer_delegate, | 63 scoped_ptr<storage::FileWriterDelegate> writer_delegate, |
| 64 scoped_ptr<net::URLRequest> blob_request, | 64 scoped_ptr<net::URLRequest> blob_request, |
| 65 const WriteCallback& callback) OVERRIDE; | 65 const WriteCallback& callback) override; |
| 66 virtual void Truncate(const storage::FileSystemURL& url, | 66 virtual void Truncate(const storage::FileSystemURL& url, |
| 67 int64 length, | 67 int64 length, |
| 68 const StatusCallback& callback) OVERRIDE; | 68 const StatusCallback& callback) override; |
| 69 virtual void TouchFile(const storage::FileSystemURL& url, | 69 virtual void TouchFile(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 OpenFile(const storage::FileSystemURL& url, | 73 virtual void OpenFile(const storage::FileSystemURL& url, |
| 74 int file_flags, | 74 int file_flags, |
| 75 const OpenFileCallback& callback) OVERRIDE; | 75 const OpenFileCallback& callback) override; |
| 76 virtual void Cancel(const StatusCallback& cancel_callback) OVERRIDE; | 76 virtual void Cancel(const StatusCallback& cancel_callback) override; |
| 77 virtual void CreateSnapshotFile( | 77 virtual void CreateSnapshotFile( |
| 78 const storage::FileSystemURL& path, | 78 const storage::FileSystemURL& path, |
| 79 const SnapshotFileCallback& callback) OVERRIDE; | 79 const SnapshotFileCallback& callback) override; |
| 80 virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path, | 80 virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path, |
| 81 const storage::FileSystemURL& dest_url, | 81 const storage::FileSystemURL& dest_url, |
| 82 const StatusCallback& callback) OVERRIDE; | 82 const StatusCallback& callback) override; |
| 83 virtual void RemoveFile(const storage::FileSystemURL& url, | 83 virtual void RemoveFile(const storage::FileSystemURL& url, |
| 84 const StatusCallback& callback) OVERRIDE; | 84 const StatusCallback& callback) override; |
| 85 virtual void RemoveDirectory(const storage::FileSystemURL& url, | 85 virtual void RemoveDirectory(const storage::FileSystemURL& url, |
| 86 const StatusCallback& callback) OVERRIDE; | 86 const StatusCallback& callback) override; |
| 87 virtual void CopyFileLocal(const storage::FileSystemURL& src_url, | 87 virtual void CopyFileLocal(const storage::FileSystemURL& src_url, |
| 88 const storage::FileSystemURL& dest_url, | 88 const storage::FileSystemURL& dest_url, |
| 89 CopyOrMoveOption option, | 89 CopyOrMoveOption option, |
| 90 const CopyFileProgressCallback& progress_callback, | 90 const CopyFileProgressCallback& progress_callback, |
| 91 const StatusCallback& callback) OVERRIDE; | 91 const StatusCallback& callback) override; |
| 92 virtual void MoveFileLocal(const storage::FileSystemURL& src_url, | 92 virtual void MoveFileLocal(const storage::FileSystemURL& src_url, |
| 93 const storage::FileSystemURL& dest_url, | 93 const storage::FileSystemURL& dest_url, |
| 94 CopyOrMoveOption option, | 94 CopyOrMoveOption option, |
| 95 const StatusCallback& callback) OVERRIDE; | 95 const StatusCallback& callback) override; |
| 96 virtual base::File::Error SyncGetPlatformPath( | 96 virtual base::File::Error SyncGetPlatformPath( |
| 97 const storage::FileSystemURL& url, | 97 const storage::FileSystemURL& url, |
| 98 base::FilePath* platform_path) OVERRIDE; | 98 base::FilePath* platform_path) override; |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 typedef SyncableFileSystemOperation self; | 101 typedef SyncableFileSystemOperation self; |
| 102 class QueueableTask; | 102 class QueueableTask; |
| 103 | 103 |
| 104 // Only SyncFileSystemBackend can create a new operation directly. | 104 // Only SyncFileSystemBackend can create a new operation directly. |
| 105 friend class SyncFileSystemBackend; | 105 friend class SyncFileSystemBackend; |
| 106 | 106 |
| 107 SyncableFileSystemOperation( | 107 SyncableFileSystemOperation( |
| 108 const storage::FileSystemURL& url, | 108 const storage::FileSystemURL& url, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 126 StatusCallback completion_callback_; | 126 StatusCallback completion_callback_; |
| 127 | 127 |
| 128 base::WeakPtrFactory<SyncableFileSystemOperation> weak_factory_; | 128 base::WeakPtrFactory<SyncableFileSystemOperation> weak_factory_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(SyncableFileSystemOperation); | 130 DISALLOW_COPY_AND_ASSIGN(SyncableFileSystemOperation); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace sync_file_system | 133 } // namespace sync_file_system |
| 134 | 134 |
| 135 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNCABLE_FILE_SYSTEM_OPERATION_
H_ | 135 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNCABLE_FILE_SYSTEM_OPERATION_
H_ |
| OLD | NEW |