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

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 9b1d92a2b7842393f3f29929a192e59d65285f46..f168e1332a18a876e163d48bc126bb89f7e78502 100644
--- a/webkit/browser/fileapi/file_system_operation_impl.cc
+++ b/webkit/browser/fileapi/file_system_operation_impl.cc
@@ -66,11 +66,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(),
@@ -275,9 +279,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,
« no previous file with comments | « webkit/browser/fileapi/file_system_operation_impl.h ('k') | webkit/browser/fileapi/file_system_operation_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698