Chromium Code Reviews| 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..1494ac830a12635d913c4b812dc9aaf8c77c7a6d 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,12 @@ class MTPDeviceTaskHelper { |
| const std::string& data, |
| bool error) const; |
| + // Called when CopyFileFromLocal completed either succeeded or failed. |
|
Lei Zhang
2015/03/02 23:41:39
nit: grammar.
yawano
2015/03/03 09:16:54
Done. I wish this change fixes the error.
|
| + 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 |