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

Unified Diff: chrome/browser/chromeos/file_manager/volume_manager.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
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/device_media_async_file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/volume_manager.cc
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.cc b/chrome/browser/chromeos/file_manager/volume_manager.cc
index 7c2dde6eb685d5176dbdff1af2fa7b1429f3f109..6820aab0e8206ea76252e42df997a312f125b2cc 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager.cc
@@ -661,18 +661,23 @@ void VolumeManager::OnRemovableStorageAttached(
storage::FileSystemMountOption(),
path);
DCHECK(result);
+
+ // TODO(yawano) A variable to switch MTP write support. This variable should
+ // be false until MTP write operation is implemented and shipped.
+ bool write_supported = false;
+
content::BrowserThread::PostTask(
- content::BrowserThread::IO, FROM_HERE, base::Bind(
- &MTPDeviceMapService::RegisterMTPFileSystem,
- base::Unretained(MTPDeviceMapService::GetInstance()),
- info.location(), fsid));
+ content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&MTPDeviceMapService::RegisterMTPFileSystem,
+ base::Unretained(MTPDeviceMapService::GetInstance()),
+ info.location(), fsid, !write_supported /* read_only */));
VolumeInfo volume_info;
volume_info.type = VOLUME_TYPE_MTP;
volume_info.mount_path = path;
volume_info.mount_condition = chromeos::disks::MOUNT_CONDITION_NONE;
volume_info.is_parent = true;
- volume_info.is_read_only = true;
+ volume_info.is_read_only = !write_supported;
volume_info.volume_id = kMtpVolumeIdPrefix + label;
volume_info.volume_label = label;
volume_info.source_path = path;
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/device_media_async_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698