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 WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // and |virtual_path|. On failure to create a file system operation, set | 80 // and |virtual_path|. On failure to create a file system operation, set |
81 // |error_code| correspondingly. | 81 // |error_code| correspondingly. |
82 // This method is usually dispatched by | 82 // This method is usually dispatched by |
83 // FileSystemContext::CreateFileSystemOperation. | 83 // FileSystemContext::CreateFileSystemOperation. |
84 virtual FileSystemOperation* CreateFileSystemOperation( | 84 virtual FileSystemOperation* CreateFileSystemOperation( |
85 const FileSystemURL& url, | 85 const FileSystemURL& url, |
86 FileSystemContext* context, | 86 FileSystemContext* context, |
87 base::PlatformFileError* error_code) const = 0; | 87 base::PlatformFileError* error_code) const = 0; |
88 | 88 |
89 // Creates a new file stream reader for a given filesystem URL |url| with an | 89 // Creates a new file stream reader for a given filesystem URL |url| with an |
90 // offset |offset|. | 90 // offset |offset|. |expected_modification_time| specifies the expected last |
| 91 // modification if the value is non-null, the reader will check the underlying |
| 92 // file's actual modification time to see if the file has been modified, and |
| 93 // if it does any succeeding read operations should fail with |
| 94 // ERR_UPLOAD_FILE_CHANGED error. |
91 // The returned object must be owned and managed by the caller. | 95 // The returned object must be owned and managed by the caller. |
92 // This method itself does *not* check if the given path exists and is a | 96 // This method itself does *not* check if the given path exists and is a |
93 // regular file. | 97 // regular file. |
94 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( | 98 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( |
95 const FileSystemURL& url, | 99 const FileSystemURL& url, |
96 int64 offset, | 100 int64 offset, |
| 101 const base::Time& expected_modification_time, |
97 FileSystemContext* context) const = 0; | 102 FileSystemContext* context) const = 0; |
98 | 103 |
99 // Creates a new file stream writer for a given filesystem URL |url| with an | 104 // Creates a new file stream writer for a given filesystem URL |url| with an |
100 // offset |offset|. | 105 // offset |offset|. |
101 // The returned object must be owned and managed by the caller. | 106 // The returned object must be owned and managed by the caller. |
102 // This method itself does *not* check if the given path exists and is a | 107 // This method itself does *not* check if the given path exists and is a |
103 // regular file. | 108 // regular file. |
104 virtual FileStreamWriter* CreateFileStreamWriter( | 109 virtual FileStreamWriter* CreateFileStreamWriter( |
105 const FileSystemURL& url, | 110 const FileSystemURL& url, |
106 int64 offset, | 111 int64 offset, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; | 156 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; |
152 // Gets virtual path by known filesystem path. Returns false when filesystem | 157 // Gets virtual path by known filesystem path. Returns false when filesystem |
153 // path is not exposed by this provider. | 158 // path is not exposed by this provider. |
154 virtual bool GetVirtualPath(const FilePath& file_system_path, | 159 virtual bool GetVirtualPath(const FilePath& file_system_path, |
155 FilePath* virtual_path) = 0; | 160 FilePath* virtual_path) = 0; |
156 }; | 161 }; |
157 | 162 |
158 } // namespace fileapi | 163 } // namespace fileapi |
159 | 164 |
160 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 165 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
OLD | NEW |