| Index: storage/browser/fileapi/file_system_operation.h
|
| diff --git a/storage/browser/fileapi/file_system_operation.h b/storage/browser/fileapi/file_system_operation.h
|
| index bc5bc879a845d2df25d569d6f6c459a979b121d1..aaf87f8018579a6f560efb439a4f838f04eb2855 100644
|
| --- a/storage/browser/fileapi/file_system_operation.h
|
| +++ b/storage/browser/fileapi/file_system_operation.h
|
| @@ -68,12 +68,6 @@ class FileSystemOperation {
|
| // Used for CreateFile(), etc. |result| is the return code of the operation.
|
| typedef base::Callback<void(base::File::Error result)> StatusCallback;
|
|
|
| - // Called when an error had happened during operation.
|
| - // |url| is the url of processed entry.
|
| - // |error| is the error code of the failed operation.
|
| - typedef base::Callback<void(const FileSystemURL& url,
|
| - base::File::Error error)> ErrorCallback;
|
| -
|
| // Used for GetMetadata(). |result| is the return code of the operation,
|
| // |file_info| is the obtained file info.
|
| typedef base::Callback<
|
| @@ -126,6 +120,13 @@ class FileSystemOperation {
|
| const scoped_refptr<storage::ShareableFileReference>& file_ref)>
|
| SnapshotFileCallback;
|
|
|
| + // Used to specify how recursive operation delegate behaves for errors.
|
| + // With ERROR_BEHAVIOR_TERMINATE, it stops following operation when it fails
|
| + // an operation.
|
| + // With ERROR_BEHAVIOR_CONTINUE, it continues following operation even when it
|
| + // fails some of the operations.
|
| + enum ErrorBehavior { ERROR_BEHAVIOR_TERMINATE, ERROR_BEHAVIOR_CONTINUE };
|
| +
|
| // Used for progress update callback for Copy().
|
| //
|
| // BEGIN_COPY_ENTRY is fired for each copy creation beginning (for both
|
| @@ -199,6 +200,7 @@ class FileSystemOperation {
|
| BEGIN_COPY_ENTRY,
|
| END_COPY_ENTRY,
|
| PROGRESS,
|
| + ERROR
|
| };
|
| typedef base::Callback<void(CopyProgressType type,
|
| const FileSystemURL& source_url,
|
| @@ -251,6 +253,8 @@ class FileSystemOperation {
|
| // |dest_path| as needed.
|
| // |option| specifies the minor behavior of Copy(). See CopyOrMoveOption's
|
| // comment for details.
|
| + // |error_behavior| specifies whether this continues operation after it
|
| + // failed an operation or not.
|
| // |progress_callback| is periodically called to report the progress
|
| // update. See also the comment of CopyProgressCallback. This callback is
|
| // optional.
|
| @@ -266,6 +270,7 @@ class FileSystemOperation {
|
| virtual void Copy(const FileSystemURL& src_path,
|
| const FileSystemURL& dest_path,
|
| CopyOrMoveOption option,
|
| + const ErrorBehavior error_behavior,
|
| const CopyProgressCallback& progress_callback,
|
| const StatusCallback& callback) = 0;
|
|
|
|
|