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

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

Issue 1007173003: Implement MoveFileLocal (with rename operation). (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_task_helper.h
diff --git a/chrome/browser/media_galleries/linux/mtp_device_task_helper.h b/chrome/browser/media_galleries/linux/mtp_device_task_helper.h
index ab99e3fae2dc786f13ba4963db1c67750d1d46c6..bbd486ffd2e36e8a75e5989bb9a5a3579b7a7a36 100644
--- a/chrome/browser/media_galleries/linux/mtp_device_task_helper.h
+++ b/chrome/browser/media_galleries/linux/mtp_device_task_helper.h
@@ -36,6 +36,8 @@ class MTPDeviceTaskHelper {
typedef base::Callback<void(const storage::AsyncFileUtil::EntryList& entries,
bool has_more)> ReadDirectorySuccessCallback;
+ typedef base::Closure RenameObjectSuccessCallback;
+
typedef base::Closure CopyFileFromLocalSuccessCallback;
typedef base::Closure DeleteObjectSuccessCallback;
@@ -101,6 +103,12 @@ class MTPDeviceTaskHelper {
// called on the IO thread to notify the caller about success or failure.
void ReadBytes(const MTPDeviceAsyncDelegate::ReadBytesRequest& request);
+ // Forwards RenameObject request to the MediaTransferProtocolManager.
+ void RenameObject(const uint32 object_id,
+ const std::string& new_name,
+ const RenameObjectSuccessCallback& success_callback,
+ const ErrorCallback& error_callback);
+
// Forwards CopyFileFromLocal request to the MediaTransferProtocolManager.
void CopyFileFromLocal(
const std::string& storage_name,
@@ -179,6 +187,11 @@ class MTPDeviceTaskHelper {
const std::string& data,
bool error) const;
+ // Called when RenameObject completes.
+ void OnRenameObject(const RenameObjectSuccessCallback& success_callback,
+ const ErrorCallback& error_callback,
+ const bool error) const;
+
// Called when CopyFileFromLocal completes.
void OnCopyFileFromLocal(
const CopyFileFromLocalSuccessCallback& success_callback,

Powered by Google App Engine
This is Rietveld 408576698