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

Unified Diff: storage/browser/fileapi/file_system_operation.h

Issue 1194783002: Add fileManagerPrivate.onCopyError event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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..6cb1f970bd0e90c3d3d9826366eaf5d43207cc60 100644
--- a/storage/browser/fileapi/file_system_operation.h
+++ b/storage/browser/fileapi/file_system_operation.h
@@ -74,6 +74,18 @@ class FileSystemOperation {
typedef base::Callback<void(const FileSystemURL& url,
base::File::Error error)> ErrorCallback;
yawano 2015/06/19 06:50:16 @tzik: While I added this in http://crrev.com/1184
+ // Called when an error had happened during copy operation.
+ // |error| is the error code of the failed copy operation.
+ // |source_url| is the url of source file.
+ // |destination_url| is the url of destination file.
+ //
+ // An error can be happened during a recursive operation. The urls of children
+ // files or directories are set to source_url and destination_url.
+ typedef base::Callback<void(base::File::Error error,
+ const FileSystemURL& source_url,
+ const FileSystemURL& destination_url)>
+ CopyOrMoveErrorCallback;
+
// Used for GetMetadata(). |result| is the return code of the operation,
// |file_info| is the obtained file info.
typedef base::Callback<
@@ -251,6 +263,9 @@ class FileSystemOperation {
// |dest_path| as needed.
// |option| specifies the minor behavior of Copy(). See CopyOrMoveOption's
// comment for details.
+ // |continue_with_error| is whether it continues copy operation even when it
+ // fails to copy one of the files.
+ // |error_callback| is called when an error had happened during the operation.
// |progress_callback| is periodically called to report the progress
// update. See also the comment of CopyProgressCallback. This callback is
// optional.
@@ -266,6 +281,8 @@ class FileSystemOperation {
virtual void Copy(const FileSystemURL& src_path,
const FileSystemURL& dest_path,
CopyOrMoveOption option,
+ const bool continue_with_error,
+ const CopyOrMoveErrorCallback& error_callback,
const CopyProgressCallback& progress_callback,
const StatusCallback& callback) = 0;

Powered by Google App Engine
This is Rietveld 408576698