| 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 df284a12907fa01787b94d88aab019ceecda669e..a98c476a9fbedba028e75d63cfc14c6849d1c3bc 100644
|
| --- a/chrome/browser/media_galleries/linux/mtp_device_task_helper.h
|
| +++ b/chrome/browser/media_galleries/linux/mtp_device_task_helper.h
|
| @@ -36,8 +36,13 @@ class MTPDeviceTaskHelper {
|
| typedef base::Callback<void(const storage::AsyncFileUtil::EntryList& entries,
|
| bool has_more)> ReadDirectorySuccessCallback;
|
|
|
| + typedef base::Callback<void(const std::vector<uint32>& file_ids)>
|
| + ReadDirectoryEntryIdsSuccessCallback;
|
| +
|
| typedef base::Closure CopyFileFromLocalSuccessCallback;
|
|
|
| + typedef base::Closure DeleteObjectSuccessCallback;
|
| +
|
| typedef MTPDeviceAsyncDelegate::ErrorCallback ErrorCallback;
|
|
|
| MTPDeviceTaskHelper();
|
| @@ -82,6 +87,11 @@ class MTPDeviceTaskHelper {
|
| const ReadDirectorySuccessCallback& success_callback,
|
| const ErrorCallback& error_callback);
|
|
|
| + void ReadDirectoryEntryIds(
|
| + const uint32 directory_id,
|
| + const ReadDirectoryEntryIdsSuccessCallback& success_callback,
|
| + const ErrorCallback& error_callback);
|
| +
|
| // Forwards the WriteDataIntoSnapshotFile request to the MTPReadFileWorker
|
| // object.
|
| //
|
| @@ -107,6 +117,11 @@ class MTPDeviceTaskHelper {
|
| const CopyFileFromLocalSuccessCallback& success_callback,
|
| const ErrorCallback& error_callback);
|
|
|
| + // Forwards DeleteObject request to the MediaTransferProtocolManager.
|
| + void DeleteObject(const uint32 object_id,
|
| + const DeleteObjectSuccessCallback& success_callback,
|
| + const ErrorCallback& error_callback);
|
| +
|
| // Dispatches the CloseStorage request to the MediaTransferProtocolManager.
|
| void CloseStorage() const;
|
|
|
| @@ -150,6 +165,12 @@ class MTPDeviceTaskHelper {
|
| bool has_more,
|
| bool error) const;
|
|
|
| + void OnDidReadDirectoryEntryIds(
|
| + const ReadDirectoryEntryIdsSuccessCallback& success_callback,
|
| + const ErrorCallback& error_callback,
|
| + const std::vector<uint32>& file_ids,
|
| + const bool error) const;
|
| +
|
| // Intermediate step to finish a ReadBytes request.
|
| void OnGetFileInfoToReadBytes(
|
| const MTPDeviceAsyncDelegate::ReadBytesRequest& request,
|
| @@ -171,13 +192,17 @@ class MTPDeviceTaskHelper {
|
| const std::string& data,
|
| bool error) const;
|
|
|
| - // Called when CopyFileFromLocal completed no matter if it succeeded or
|
| - // failed.
|
| + // Called when CopyFileFromLocal completes.
|
| void OnCopyFileFromLocal(
|
| const CopyFileFromLocalSuccessCallback& success_callback,
|
| const ErrorCallback& error_callback,
|
| const bool error) const;
|
|
|
| + // Called when DeleteObject completes.
|
| + void OnDeleteObject(const DeleteObjectSuccessCallback& 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
|
|
|