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

Unified Diff: webkit/fileapi/file_system_operation_interface.h

Issue 9016020: Cleanup FileSystemOperation for preparing for adding FSO-factory method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup around ValidateFileSystemRoot Created 9 years 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
Index: webkit/fileapi/file_system_operation_interface.h
diff --git a/webkit/fileapi/file_system_operation_interface.h b/webkit/fileapi/file_system_operation_interface.h
index 033abead4ec07aa9c34f4f887759370d304b8fe0..661f91d234ced6dcbc847eae265614d0126febcf 100644
--- a/webkit/fileapi/file_system_operation_interface.h
+++ b/webkit/fileapi/file_system_operation_interface.h
@@ -20,6 +20,8 @@ class GURL;
namespace fileapi {
+class FileSystemCallbackDispatcher;
+
// The interface class for FileSystemOperation implementations.
//
// This interface defines file system operations required to implement
@@ -46,12 +48,6 @@ class FileSystemOperationInterface {
public:
virtual ~FileSystemOperationInterface() {}
- // Opens a file system at |origin_url| of the |type|. Creates a new file
- // system if |create| is true.
- virtual void OpenFileSystem(const GURL& origin_url,
- fileapi::FileSystemType type,
- bool create) = 0;
-
// Creates a file at |path|. If |exclusive| is true, an error is raised
// in case a file is already present at the URL.
virtual void CreateFile(const GURL& path,
@@ -105,6 +101,20 @@ class FileSystemOperationInterface {
// part is filled with null bytes.
virtual void Truncate(const GURL& path, int64 length) = 0;
+ // Tries to cancel the current operation [we support cancelling write or
+ // truncate only]. Reports failure for the current operation, then reports
+ // success for the cancel operation itself via the |cancel_dispatcher|.
+ // The ownership of |cancel_dispatcher| is transfered to and will deleted
satorux1 2011/12/27 18:56:37 will deleted -> will be deleted?
kinuko 2011/12/28 10:59:35 Done.
+ // by the operation.
+ //
+ // E.g. a typical cancel flow would look like:
+ //
+ // abort_current_operation();
satorux1 2011/12/27 18:56:37 what's this? Please add some explanation. Besides
kinuko 2011/12/28 10:59:35 Done.
+ // dispatcher_->DidFail(base::PLATFORM_FILE_ERROR_ABORT);
satorux1 2011/12/27 18:56:37 dispatcher here is the dispather attached to the o
kinuko 2011/12/28 10:59:35 Done.
+ // cancel_dispatcher->DidSucceed();
+ //
+ virtual void Cancel(FileSystemCallbackDispatcher* cancel_dispatcher) = 0;
+
// Modifies timestamps of a file or directory at |path| with
// |last_access_time| and |last_modified_time|. The function DOES NOT
// create a file unlike 'touch' command on Linux.

Powered by Google App Engine
This is Rietveld 408576698