Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: webkit/fileapi/file_system_operation.h

Issue 11410019: ********** Chromium Blob hacking (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_OPERATION_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file_util_proxy.h" 10 #include "base/files/file_util_proxy.h"
11 #include "base/platform_file.h" 11 #include "base/platform_file.h"
12 #include "base/process.h" 12 #include "base/process.h"
13 13
14 namespace base { 14 namespace base {
15 class Time; 15 class Time;
16 } // namespace base 16 } // namespace base
17 17
18 namespace net { 18 namespace net {
19 class URLRequestContext; 19 class URLRequestContext;
20 } // namespace net 20 } // namespace net
21 21
22 namespace webkit_blob { 22 namespace webkit_blob {
23 class BlobDataHandle;
23 class ShareableFileReference; 24 class ShareableFileReference;
24 } 25 }
25 26
26 class GURL; 27 class GURL;
27 28
28 namespace fileapi { 29 namespace fileapi {
29 30
30 class FileSystemURL; 31 class FileSystemURL;
31 class LocalFileSystemOperation; 32 class LocalFileSystemOperation;
32 33
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 160
160 // Reads contents of a directory at |path|. 161 // Reads contents of a directory at |path|.
161 virtual void ReadDirectory(const FileSystemURL& path, 162 virtual void ReadDirectory(const FileSystemURL& path,
162 const ReadDirectoryCallback& callback) = 0; 163 const ReadDirectoryCallback& callback) = 0;
163 164
164 // Removes a file or directory at |path|. If |recursive| is true, remove 165 // Removes a file or directory at |path|. If |recursive| is true, remove
165 // all files and directories under the directory at |path| recursively. 166 // all files and directories under the directory at |path| recursively.
166 virtual void Remove(const FileSystemURL& path, bool recursive, 167 virtual void Remove(const FileSystemURL& path, bool recursive,
167 const StatusCallback& callback) = 0; 168 const StatusCallback& callback) = 0;
168 169
169 // Writes contents of |blob_url| to |path| at |offset|. 170 // Writes contents of |blob| to |path| at |offset|.
170 // |url_request_context| is used to read contents in |blob_url|. 171 // |url_request_context| is used to read contents in |blob|.
171 virtual void Write(const net::URLRequestContext* url_request_context, 172 virtual void Write(const net::URLRequestContext* url_request_context,
172 const FileSystemURL& path, 173 const FileSystemURL& path,
173 const GURL& blob_url, 174 scoped_ptr<webkit_blob::BlobDataHandle> blob_handle,
174 int64 offset, 175 int64 offset,
175 const WriteCallback& callback) = 0; 176 const WriteCallback& callback) = 0;
176 177
177 // Truncates a file at |path| to |length|. If |length| is larger than 178 // Truncates a file at |path| to |length|. If |length| is larger than
178 // the original file size, the file will be extended, and the extended 179 // the original file size, the file will be extended, and the extended
179 // part is filled with null bytes. 180 // part is filled with null bytes.
180 virtual void Truncate(const FileSystemURL& path, int64 length, 181 virtual void Truncate(const FileSystemURL& path, int64 length,
181 const StatusCallback& callback) = 0; 182 const StatusCallback& callback) = 0;
182 183
183 // Tries to cancel the current operation [we support cancelling write or 184 // Tries to cancel the current operation [we support cancelling write or
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 kOperationOpenFile, 272 kOperationOpenFile,
272 kOperationCloseFile, 273 kOperationCloseFile,
273 kOperationGetLocalPath, 274 kOperationGetLocalPath,
274 kOperationCancel, 275 kOperationCancel,
275 }; 276 };
276 }; 277 };
277 278
278 } // namespace fileapi 279 } // namespace fileapi
279 280
280 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ 281 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_
OLDNEW
« no previous file with comments | « webkit/chromeos/fileapi/remote_file_system_operation.cc ('k') | webkit/fileapi/local_file_system_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698