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 31ac534c52454a0e6155e54f789abddd7c0ed27e..df284a12907fa01787b94d88aab019ceecda669e 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 CopyFileFromLocalSuccessCallback; |
+ |
typedef MTPDeviceAsyncDelegate::ErrorCallback ErrorCallback; |
MTPDeviceTaskHelper(); |
@@ -48,6 +50,7 @@ class MTPDeviceTaskHelper { |
// |callback| is called when the OpenStorage request completes. |callback| |
// runs on the IO thread. |
void OpenStorage(const std::string& storage_name, |
+ const bool read_only, |
const OpenStorageCallback& callback); |
// Dispatches the GetFileInfo request to the MediaTransferProtocolManager. |
@@ -95,6 +98,15 @@ class MTPDeviceTaskHelper { |
// called on the IO thread to notify the caller about success or failure. |
void ReadBytes(const MTPDeviceAsyncDelegate::ReadBytesRequest& request); |
+ // Forwards CopyFileFromLocal request to the MediaTransferProtocolManager. |
+ void CopyFileFromLocal( |
+ const std::string& storage_name, |
+ const int source_file_descriptor, |
+ const uint32 parent_id, |
+ const std::string& file_name, |
+ const CopyFileFromLocalSuccessCallback& success_callback, |
+ const ErrorCallback& error_callback); |
+ |
// Dispatches the CloseStorage request to the MediaTransferProtocolManager. |
void CloseStorage() const; |
@@ -159,6 +171,13 @@ class MTPDeviceTaskHelper { |
const std::string& data, |
bool error) const; |
+ // Called when CopyFileFromLocal completed no matter if it succeeded or |
+ // failed. |
+ void OnCopyFileFromLocal( |
+ const CopyFileFromLocalSuccessCallback& success_callback, |
+ const ErrorCallback& error_callback, |
+ const bool error) const; |
+ |
// Called when the device is uninitialized. |
// |
// Runs |error_callback| on the IO thread to notify the caller about the |