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

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: Update comment. 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
« no previous file with comments | « no previous file | chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4f55f7fdab38c06b6117d135d2b83c55f90ab323 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, base::File::Error>& open_fd_result);
virtual void DeleteFileInternal(
const base::FilePath& file_path,
const DeleteFileSuccessCallback& success_callback,
@@ -242,6 +242,21 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
scoped_ptr<SnapshotRequestInfo> snapshot_request_info,
const base::File::Info& file_info);
+ // Called when GetFileInfo() for destination path succeeded for a
+ // CopyFileFromLocal operation.
+ void OnDidGetDestFileInfoToCopyFileFromLocal(
+ const ErrorCallback& error_callback,
+ const base::File::Info& file_info);
+
+ // Called when GetFileInfo() for destination path failed to copy file from
+ // local.
+ void OnGetDestFileInfoErrorToCopyFileFromLocal(
+ 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.
« no previous file with comments | « no previous file | chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698