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_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 // Returns true if specified |type| of filesystem can handle Copy() | 95 // Returns true if specified |type| of filesystem can handle Copy() |
96 // of the files in the same file system instead of streaming | 96 // of the files in the same file system instead of streaming |
97 // read/write implementation. | 97 // read/write implementation. |
98 virtual bool HasInplaceCopyImplementation(FileSystemType type) const = 0; | 98 virtual bool HasInplaceCopyImplementation(FileSystemType type) const = 0; |
99 | 99 |
100 // Creates a new file stream reader for a given filesystem URL |url| with an | 100 // Creates a new file stream reader for a given filesystem URL |url| with an |
101 // offset |offset|. |expected_modification_time| specifies the expected last | 101 // offset |offset|. |expected_modification_time| specifies the expected last |
102 // modification if the value is non-null, the reader will check the underlying | 102 // modification if the value is non-null, the reader will check the underlying |
103 // file's actual modification time to see if the file has been modified, and | 103 // file's actual modification time to see if the file has been modified, and |
104 // if it does any succeeding read operations should fail with | 104 // if it does any succeeding read operations should fail with |
105 // ERR_UPLOAD_FILE_CHANGED error. | 105 // ERR_UPLOAD_FILE_CHANGED error. |
kinaba
2014/08/25 08:07:54
Could you also add a comment on |length| here in a
mtomasz
2014/08/25 08:30:13
Done.
| |
106 // This method itself does *not* check if the given path exists and is a | 106 // This method itself does *not* check if the given path exists and is a |
107 // regular file. | 107 // regular file. |
108 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | 108 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( |
109 const FileSystemURL& url, | 109 const FileSystemURL& url, |
110 int64 offset, | 110 int64 offset, |
111 int64 length, | |
111 const base::Time& expected_modification_time, | 112 const base::Time& expected_modification_time, |
112 FileSystemContext* context) const = 0; | 113 FileSystemContext* context) const = 0; |
113 | 114 |
114 // Creates a new file stream writer for a given filesystem URL |url| with an | 115 // Creates a new file stream writer for a given filesystem URL |url| with an |
115 // offset |offset|. | 116 // offset |offset|. |
116 // This method itself does *not* check if the given path exists and is a | 117 // This method itself does *not* check if the given path exists and is a |
117 // regular file. | 118 // regular file. |
118 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( | 119 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( |
119 const FileSystemURL& url, | 120 const FileSystemURL& url, |
120 int64 offset, | 121 int64 offset, |
(...skipping 28 matching lines...) Expand all Loading... | |
149 const std::string& extension_id) = 0; | 150 const std::string& extension_id) = 0; |
150 // Gets virtual path by known filesystem path. Returns false when filesystem | 151 // Gets virtual path by known filesystem path. Returns false when filesystem |
151 // path is not exposed by this provider. | 152 // path is not exposed by this provider. |
152 virtual bool GetVirtualPath(const base::FilePath& file_system_path, | 153 virtual bool GetVirtualPath(const base::FilePath& file_system_path, |
153 base::FilePath* virtual_path) = 0; | 154 base::FilePath* virtual_path) = 0; |
154 }; | 155 }; |
155 | 156 |
156 } // namespace storage | 157 } // namespace storage |
157 | 158 |
158 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 159 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
OLD | NEW |