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

Unified Diff: chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm

Issue 947943002: Implement CopyFileFromLocal of MTPDeviceAsyncDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 10 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
Index: chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
index 9c54cc729c94ed66e8cb32cafdb9f4b3661f0404..a8781bcceca3c99335739b8d02e490f862c8860e 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
@@ -209,6 +209,18 @@ void MTPDeviceDelegateImplMac::ReadBytes(
NOTREACHED();
}
+bool MTPDeviceDelegateImplMac::IsReadOnly() {
+ return true;
+}
+
+void MTPDeviceDelegateImplMac::CopyFileFromLocal(
+ const base::FilePath& source_file_path,
+ const base::FilePath& device_file_path,
+ const CopyFileFromLocalSuccessCallback& success_callback,
+ const ErrorCallback& error_callback) {
+ NOTREACHED();
+}
+
void MTPDeviceDelegateImplMac::CancelPendingTasksAndDeleteDelegate() {
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(&MTPDeviceDelegateImplMac::CancelAndDelete,
@@ -480,7 +492,11 @@ MTPDeviceDelegateImplMac::ReadDirectoryRequest::~ReadDirectoryRequest() {}
void CreateMTPDeviceAsyncDelegate(
const base::FilePath::StringType& device_location,
+ const bool read_only,
const CreateMTPDeviceAsyncDelegateCallback& cb) {
+ // Write operation is not supported on Mac.
+ DCHECK(read_only);
+
std::string device_name = base::FilePath(device_location).BaseName().value();
std::string device_id;
storage_monitor::StorageInfo::Type type;

Powered by Google App Engine
This is Rietveld 408576698