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

Unified Diff: device/media_transfer_protocol/media_transfer_protocol_manager.cc

Issue 378263002: Devices: Remove MTP functions that use file paths. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 5 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
« no previous file with comments | « device/media_transfer_protocol/media_transfer_protocol_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/media_transfer_protocol/media_transfer_protocol_manager.cc
===================================================================
--- device/media_transfer_protocol/media_transfer_protocol_manager.cc (revision 281682)
+++ device/media_transfer_protocol/media_transfer_protocol_manager.cc (working copy)
@@ -149,26 +149,6 @@
}
// MediaTransferProtocolManager override.
- virtual void ReadDirectoryByPath(
- const std::string& storage_handle,
- const std::string& path,
- const ReadDirectoryCallback& callback) OVERRIDE {
- DCHECK(thread_checker_.CalledOnValidThread());
- if (!ContainsKey(handles_, storage_handle) || !mtp_client_) {
- callback.Run(std::vector<MtpFileEntry>(), true);
- return;
- }
- read_directory_callbacks_.push(callback);
- mtp_client_->ReadDirectoryByPath(
- storage_handle,
- path,
- base::Bind(&MediaTransferProtocolManagerImpl::OnReadDirectory,
- weak_ptr_factory_.GetWeakPtr()),
- base::Bind(&MediaTransferProtocolManagerImpl::OnReadDirectoryError,
- weak_ptr_factory_.GetWeakPtr()));
- }
-
- // MediaTransferProtocolManager override.
virtual void ReadDirectoryById(
const std::string& storage_handle,
uint32 file_id,
@@ -189,26 +169,6 @@
}
// MediaTransferProtocolManager override.
- virtual void ReadFileChunkByPath(const std::string& storage_handle,
- const std::string& path,
- uint32 offset,
- uint32 count,
- const ReadFileCallback& callback) OVERRIDE {
- DCHECK(thread_checker_.CalledOnValidThread());
- if (!ContainsKey(handles_, storage_handle) || !mtp_client_) {
- callback.Run(std::string(), true);
- return;
- }
- read_file_callbacks_.push(callback);
- mtp_client_->ReadFileChunkByPath(
- storage_handle, path, offset, count,
- base::Bind(&MediaTransferProtocolManagerImpl::OnReadFile,
- weak_ptr_factory_.GetWeakPtr()),
- base::Bind(&MediaTransferProtocolManagerImpl::OnReadFileError,
- weak_ptr_factory_.GetWeakPtr()));
- }
-
- // MediaTransferProtocolManager override.
virtual void ReadFileChunkById(const std::string& storage_handle,
uint32 file_id,
uint32 offset,
@@ -228,24 +188,6 @@
weak_ptr_factory_.GetWeakPtr()));
}
- virtual void GetFileInfoByPath(const std::string& storage_handle,
- const std::string& path,
- const GetFileInfoCallback& callback) OVERRIDE {
- DCHECK(thread_checker_.CalledOnValidThread());
- if (!ContainsKey(handles_, storage_handle) || !mtp_client_) {
- callback.Run(MtpFileEntry(), true);
- return;
- }
- get_file_info_callbacks_.push(callback);
- mtp_client_->GetFileInfoByPath(
- storage_handle,
- path,
- base::Bind(&MediaTransferProtocolManagerImpl::OnGetFileInfo,
- weak_ptr_factory_.GetWeakPtr()),
- base::Bind(&MediaTransferProtocolManagerImpl::OnGetFileInfoError,
- weak_ptr_factory_.GetWeakPtr()));
- }
-
virtual void GetFileInfoById(const std::string& storage_handle,
uint32 file_id,
const GetFileInfoCallback& callback) OVERRIDE {
« no previous file with comments | « device/media_transfer_protocol/media_transfer_protocol_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698