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

Unified Diff: storage/browser/fileapi/file_system_operation_impl.cc

Issue 1194783002: Add fileManagerPrivate.onCopyError event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove const and rename enum. 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_impl.cc
diff --git a/storage/browser/fileapi/file_system_operation_impl.cc b/storage/browser/fileapi/file_system_operation_impl.cc
index bf259672068ccf63d561f49054b69d746aaf71a7..30d8561aff199cd6021b6006db4fca2dce88926e 100644
--- a/storage/browser/fileapi/file_system_operation_impl.cc
+++ b/storage/browser/fileapi/file_system_operation_impl.cc
@@ -88,21 +88,18 @@ void FileSystemOperationImpl::Copy(
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
CopyOrMoveOption option,
+ ErrorBehavior error_behavior,
const CopyProgressCallback& progress_callback,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationCopy));
DCHECK(!recursive_operation_delegate_);
- // TODO(hidehiko): Support |progress_callback|. (crbug.com/278038).
- recursive_operation_delegate_.reset(
- new CopyOrMoveOperationDelegate(
- file_system_context(),
- src_url, dest_url,
- CopyOrMoveOperationDelegate::OPERATION_COPY,
- option,
- progress_callback,
- base::Bind(&FileSystemOperationImpl::DidFinishOperation,
- weak_factory_.GetWeakPtr(), callback)));
+ recursive_operation_delegate_.reset(new CopyOrMoveOperationDelegate(
+ file_system_context(), src_url, dest_url,
+ CopyOrMoveOperationDelegate::OPERATION_COPY, option, error_behavior,
+ progress_callback,
+ base::Bind(&FileSystemOperationImpl::DidFinishOperation,
+ weak_factory_.GetWeakPtr(), callback)));
recursive_operation_delegate_->RunRecursively();
}
@@ -112,15 +109,12 @@ void FileSystemOperationImpl::Move(const FileSystemURL& src_url,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationMove));
DCHECK(!recursive_operation_delegate_);
- recursive_operation_delegate_.reset(
- new CopyOrMoveOperationDelegate(
- file_system_context(),
- src_url, dest_url,
- CopyOrMoveOperationDelegate::OPERATION_MOVE,
- option,
- FileSystemOperation::CopyProgressCallback(),
- base::Bind(&FileSystemOperationImpl::DidFinishOperation,
- weak_factory_.GetWeakPtr(), callback)));
+ recursive_operation_delegate_.reset(new CopyOrMoveOperationDelegate(
+ file_system_context(), src_url, dest_url,
+ CopyOrMoveOperationDelegate::OPERATION_MOVE, option, ERROR_BEHAVIOR_ABORT,
+ FileSystemOperation::CopyProgressCallback(),
+ base::Bind(&FileSystemOperationImpl::DidFinishOperation,
+ weak_factory_.GetWeakPtr(), callback)));
recursive_operation_delegate_->RunRecursively();
}
« no previous file with comments | « storage/browser/fileapi/file_system_operation_impl.h ('k') | storage/browser/fileapi/file_system_operation_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698