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

Unified Diff: chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc

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/win/mtp_device_delegate_impl_win.cc
diff --git a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
index 21aa95e767f2b2755e185c35f8c6a9dd53cb1c94..5f1234c675e190bda361cbd844c221bc085212ef 100644
--- a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
+++ b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
@@ -315,8 +315,13 @@ void OnGetStorageInfoCreateDelegate(
void CreateMTPDeviceAsyncDelegate(
const base::string16& device_location,
+ const bool read_only,
const CreateMTPDeviceAsyncDelegateCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+
+ // Write operation is not supported on Windows.
+ DCHECK(read_only);
+
DCHECK(!device_location.empty());
base::string16* pnp_device_id = new base::string16;
base::string16* storage_object_id = new base::string16;
@@ -456,6 +461,18 @@ void MTPDeviceDelegateImplWin::ReadBytes(
NOTREACHED();
}
+bool MTPDeviceDelegateImplWin::IsReadOnly() {
+ return true;
+}
+
+void MTPDeviceDelegateImplWin::CopyFileFromLocal(
+ const base::FilePath& source_file_path,
+ const base::FilePath& device_file_path,
+ const CopyFileFromLocalSuccessCallback& success_callback,
+ const ErrorCallback& error_callback) {
+ NOTREACHED();
+}
+
void MTPDeviceDelegateImplWin::CancelPendingTasksAndDeleteDelegate() {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
PortableDeviceMapService::GetInstance()->MarkPortableDeviceForDeletion(

Powered by Google App Engine
This is Rietveld 408576698