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

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

Issue 10600013: Wired support for file truncating with RemoteFileSystemOperation::OpenFile() method (case when base… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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_INTERFACE_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util_proxy.h" 10 #include "base/file_util_proxy.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // 218 //
219 // |peer_handle| is the process handle of a pepper plugin process, which 219 // |peer_handle| is the process handle of a pepper plugin process, which
220 // is necessary for underlying IPC calls with Pepper plugins. 220 // is necessary for underlying IPC calls with Pepper plugins.
221 // 221 //
222 // This function is used only by Pepper as of writing. 222 // This function is used only by Pepper as of writing.
223 virtual void OpenFile(const GURL& path, 223 virtual void OpenFile(const GURL& path,
224 int file_flags, 224 int file_flags,
225 base::ProcessHandle peer_handle, 225 base::ProcessHandle peer_handle,
226 const OpenFileCallback& callback) = 0; 226 const OpenFileCallback& callback) = 0;
227 227
228 // Signals that the file at |path|, which was previously opened with
229 // OpenFile() call, has been closed by the caller.
230 //
231 // This function is used to give remote file systems providers opportunity to
232 // process locally modified files.
233 //
234 // This function is used only by Pepper as of writing.
235 virtual void NotifyFileClosed(const GURL& path,
236 const StatusCallback& callback) = 0;
237
228 // For downcasting to FileSystemOperation. 238 // For downcasting to FileSystemOperation.
229 // TODO(kinuko): this hack should go away once appropriate upload-stream 239 // TODO(kinuko): this hack should go away once appropriate upload-stream
230 // handling based on element types is supported. 240 // handling based on element types is supported.
231 virtual FileSystemOperation* AsFileSystemOperation() = 0; 241 virtual FileSystemOperation* AsFileSystemOperation() = 0;
232 242
233 // Creates a local snapshot file for a given |path| and returns the 243 // Creates a local snapshot file for a given |path| and returns the
234 // metadata and platform path of the snapshot file via |callback|. 244 // metadata and platform path of the snapshot file via |callback|.
235 // In local filesystem cases the implementation may simply return 245 // In local filesystem cases the implementation may simply return
236 // the metadata of the file itself (as well as GetMetadata does), 246 // the metadata of the file itself (as well as GetMetadata does),
237 // while in remote filesystem case the backend may want to download the file 247 // while in remote filesystem case the backend may want to download the file
(...skipping 16 matching lines...) Expand all
254 kOperationFileExists, 264 kOperationFileExists,
255 kOperationGetMetadata, 265 kOperationGetMetadata,
256 kOperationReadDirectory, 266 kOperationReadDirectory,
257 kOperationRemove, 267 kOperationRemove,
258 kOperationWrite, 268 kOperationWrite,
259 kOperationTruncate, 269 kOperationTruncate,
260 kOperationTouchFile, 270 kOperationTouchFile,
261 kOperationOpenFile, 271 kOperationOpenFile,
262 kOperationGetLocalPath, 272 kOperationGetLocalPath,
263 kOperationCancel, 273 kOperationCancel,
274 kOperationFileClosed,
264 }; 275 };
265 }; 276 };
266 277
267 } // namespace fileapi 278 } // namespace fileapi
268 279
269 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ 280 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698