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

Unified Diff: chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h

Issue 1025553006: Fix error handling of CopyFileFromLocal and remove unnecessary PendingRequestDone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
diff --git a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
index 016993a0f656b372e2ad9ee53171a5c6ef048bb3..563046b5a35c037c4f4aaf8f83fca6f88a7467a4 100644
--- a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
+++ b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
@@ -148,11 +148,11 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
const MoveFileLocalSuccessCallback& success_callback,
const ErrorCallback& error_callback,
const base::File::Info& source_file_info);
- virtual void CopyFileFromLocalInternal(
+ virtual void OnDidOpenFDToCopyFileFromLocal(
const base::FilePath& device_file_path,
const CopyFileFromLocalSuccessCallback& success_callback,
const ErrorCallback& error_callback,
- const int source_file_descriptor);
+ const std::pair<int, int>& open_fd_result);
virtual void DeleteFileInternal(
const base::FilePath& file_path,
const DeleteFileSuccessCallback& success_callback,
@@ -242,6 +242,18 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
scoped_ptr<SnapshotRequestInfo> snapshot_request_info,
const base::File::Info& file_info);
+ // Called when GetFileInfo() succeeded to copy file from local.
+ void OnDidGetFileInfoToCopyFileFromLocal(const ErrorCallback& error_callback,
+ const base::File::Info& file_info);
+
+ // Called when GetFileInfo() failed to copy file from local.
+ void OnGetFileInfoErrorToCopyFileFromLocal(
+ const base::FilePath& source_file_path,
+ const base::FilePath& device_file_path,
+ const CopyFileFromLocalSuccessCallback& success_callback,
+ const ErrorCallback& error_callback,
+ const base::File::Error error);
+
// Called when ReadDirectory() succeeds.
//
// |dir_id| is the directory read.

Powered by Google App Engine
This is Rietveld 408576698