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

Unified Diff: webkit/fileapi/file_system_operation.h

Issue 3604006: Revert 61462 - Add truncate and cancel for FileWriter; write and more tests w... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/file_system_callback_dispatcher.h ('k') | webkit/fileapi/file_system_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_operation.h
===================================================================
--- webkit/fileapi/file_system_operation.h (revision 61462)
+++ webkit/fileapi/file_system_operation.h (working copy)
@@ -61,7 +61,8 @@
void Remove(const FilePath& path);
- void Write(const FilePath& path, const GURL& blob_url, int64 offset);
+ void Write(
+ const FilePath& path, const GURL& blob_url, int64 offset);
void Truncate(const FilePath& path, int64 length);
@@ -69,10 +70,9 @@
const base::Time& last_access_time,
const base::Time& last_modified_time);
- // Try to cancel the current operation [we support cancelling write or
- // truncate only]. Report failure for the current operation, then tell the
- // passed-in operation to report success.
- void Cancel(FileSystemOperation* cancel_operation);
+ // Used to attempt to cancel the current operation. This currently does
+ // nothing for any operation other than Write().
+ void Cancel();
protected:
// Proxy for calling file_util_proxy methods.
@@ -114,28 +114,9 @@
base::ScopedCallbackFactory<FileSystemOperation> callback_factory_;
- FileSystemOperation* cancel_operation_;
-
#ifndef NDEBUG
- enum OperationType {
- kOperationNone,
- kOperationCreateFile,
- kOperationCreateDirectory,
- kOperationCopy,
- kOperationMove,
- kOperationDirectoryExists,
- kOperationFileExists,
- kOperationGetMetadata,
- kOperationReadDirectory,
- kOperationRemove,
- kOperationWrite,
- kOperationTruncate,
- kOperationTouchFile,
- kOperationCancel,
- };
-
// A flag to make sure we call operation only once per instance.
- OperationType pending_operation_;
+ bool operation_pending_;
#endif
DISALLOW_COPY_AND_ASSIGN(FileSystemOperation);
« no previous file with comments | « webkit/fileapi/file_system_callback_dispatcher.h ('k') | webkit/fileapi/file_system_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698