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

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

Issue 24030002: Adds callbacks to notify progress into Copy's API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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: webkit/browser/fileapi/file_system_operation_impl.cc
diff --git a/webkit/browser/fileapi/file_system_operation_impl.cc b/webkit/browser/fileapi/file_system_operation_impl.cc
index 7cae79aaf3b1045b09c1a82eab85eec77c76eaa5..14c70aba477b41c1f4baac9c06c0942527debaea 100644
--- a/webkit/browser/fileapi/file_system_operation_impl.cc
+++ b/webkit/browser/fileapi/file_system_operation_impl.cc
@@ -74,11 +74,15 @@ void FileSystemOperationImpl::CreateDirectory(const FileSystemURL& url,
base::Bind(callback, base::PLATFORM_FILE_ERROR_FAILED));
}
-void FileSystemOperationImpl::Copy(const FileSystemURL& src_url,
- const FileSystemURL& dest_url,
- const StatusCallback& callback) {
+void FileSystemOperationImpl::Copy(
+ const FileSystemURL& src_url,
+ const FileSystemURL& dest_url,
+ 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(),
@@ -283,9 +287,12 @@ void FileSystemOperationImpl::RemoveDirectory(
void FileSystemOperationImpl::CopyFileLocal(
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
+ const CopyFileProgressCallback& progress_callback,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationCopy));
DCHECK(src_url.IsInSameFileSystem(dest_url));
+
+ // TODO(hidehiko): Support progress_callback.
GetUsageAndQuotaThenRunTask(
dest_url,
base::Bind(&FileSystemOperationImpl::DoCopyFileLocal,

Powered by Google App Engine
This is Rietveld 408576698