| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/storage_monitor/test_media_transfer_protocol_manager_linux.
h" | 5 #include "components/storage_monitor/test_media_transfer_protocol_manager_linux.
h" |
| 6 | 6 |
| 7 #include "device/media_transfer_protocol/mtp_file_entry.pb.h" | 7 #include "device/media_transfer_protocol/mtp_file_entry.pb.h" |
| 8 #include "device/media_transfer_protocol/mtp_storage_info.pb.h" | 8 #include "device/media_transfer_protocol/mtp_storage_info.pb.h" |
| 9 | 9 |
| 10 namespace storage_monitor { | 10 namespace storage_monitor { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 void TestMediaTransferProtocolManagerLinux::CloseStorage( | 46 void TestMediaTransferProtocolManagerLinux::CloseStorage( |
| 47 const std::string& storage_handle, | 47 const std::string& storage_handle, |
| 48 const CloseStorageCallback& callback) { | 48 const CloseStorageCallback& callback) { |
| 49 callback.Run(true); | 49 callback.Run(true); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void TestMediaTransferProtocolManagerLinux::CreateDirectory( | 52 void TestMediaTransferProtocolManagerLinux::CreateDirectory( |
| 53 const std::string& storage_handle, | 53 const std::string& storage_handle, |
| 54 const uint32 parent_id, | 54 const uint32_t parent_id, |
| 55 const std::string& directory_name, | 55 const std::string& directory_name, |
| 56 const CreateDirectoryCallback& callback) { | 56 const CreateDirectoryCallback& callback) { |
| 57 callback.Run(true /* error */); | 57 callback.Run(true /* error */); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void TestMediaTransferProtocolManagerLinux::ReadDirectory( | 60 void TestMediaTransferProtocolManagerLinux::ReadDirectory( |
| 61 const std::string& storage_handle, | 61 const std::string& storage_handle, |
| 62 const uint32 file_id, | 62 const uint32_t file_id, |
| 63 const size_t max_size, | 63 const size_t max_size, |
| 64 const ReadDirectoryCallback& callback) { | 64 const ReadDirectoryCallback& callback) { |
| 65 callback.Run(std::vector<MtpFileEntry>(), | 65 callback.Run(std::vector<MtpFileEntry>(), |
| 66 false /* no more entries*/, | 66 false /* no more entries*/, |
| 67 true /* error */); | 67 true /* error */); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void TestMediaTransferProtocolManagerLinux::ReadFileChunk( | 70 void TestMediaTransferProtocolManagerLinux::ReadFileChunk( |
| 71 const std::string& storage_handle, | 71 const std::string& storage_handle, |
| 72 uint32 file_id, | 72 uint32_t file_id, |
| 73 uint32 offset, | 73 uint32_t offset, |
| 74 uint32 count, | 74 uint32_t count, |
| 75 const ReadFileCallback& callback) { | 75 const ReadFileCallback& callback) { |
| 76 callback.Run(std::string(), true); | 76 callback.Run(std::string(), true); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void TestMediaTransferProtocolManagerLinux::GetFileInfo( | 79 void TestMediaTransferProtocolManagerLinux::GetFileInfo( |
| 80 const std::string& storage_handle, | 80 const std::string& storage_handle, |
| 81 uint32 file_id, | 81 uint32_t file_id, |
| 82 const GetFileInfoCallback& callback) { | 82 const GetFileInfoCallback& callback) { |
| 83 callback.Run(MtpFileEntry(), true); | 83 callback.Run(MtpFileEntry(), true); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void TestMediaTransferProtocolManagerLinux::RenameObject( | 86 void TestMediaTransferProtocolManagerLinux::RenameObject( |
| 87 const std::string& storage_handle, | 87 const std::string& storage_handle, |
| 88 const uint32 object_id, | 88 const uint32_t object_id, |
| 89 const std::string& new_name, | 89 const std::string& new_name, |
| 90 const RenameObjectCallback& callback) { | 90 const RenameObjectCallback& callback) { |
| 91 callback.Run(true /* error */); | 91 callback.Run(true /* error */); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void TestMediaTransferProtocolManagerLinux::CopyFileFromLocal( | 94 void TestMediaTransferProtocolManagerLinux::CopyFileFromLocal( |
| 95 const std::string& storage_handle, | 95 const std::string& storage_handle, |
| 96 const int source_file_descriptor, | 96 const int source_file_descriptor, |
| 97 const uint32 parent_id, | 97 const uint32_t parent_id, |
| 98 const std::string& file_name, | 98 const std::string& file_name, |
| 99 const CopyFileFromLocalCallback& callback) { | 99 const CopyFileFromLocalCallback& callback) { |
| 100 callback.Run(true /* error */); | 100 callback.Run(true /* error */); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void TestMediaTransferProtocolManagerLinux::DeleteObject( | 103 void TestMediaTransferProtocolManagerLinux::DeleteObject( |
| 104 const std::string& storage_handle, | 104 const std::string& storage_handle, |
| 105 const uint32 object_id, | 105 const uint32_t object_id, |
| 106 const DeleteObjectCallback& callback) { | 106 const DeleteObjectCallback& callback) { |
| 107 callback.Run(true /* error */); | 107 callback.Run(true /* error */); |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace storage_monitor | 110 } // namespace storage_monitor |
| OLD | NEW |