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

Unified Diff: chrome/browser/chromeos/file_manager/volume_manager.cc

Issue 1013973004: Allow to create read only testing volumes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « chrome/browser/chromeos/file_manager/volume_manager.h ('k') | no next file » | 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 6820aab0e8206ea76252e42df997a312f125b2cc..22f8a22c583a48eda1530c581655bdf6cd68bd99 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager.cc
@@ -153,7 +153,8 @@ VolumeInfo CreateDownloadsVolumeInfo(const base::FilePath& downloads_path) {
VolumeInfo CreateTestingVolumeInfo(const base::FilePath& path,
VolumeType volume_type,
- chromeos::DeviceType device_type) {
+ chromeos::DeviceType device_type,
+ bool read_only) {
VolumeInfo volume_info;
volume_info.type = volume_type;
volume_info.device_type = device_type;
@@ -161,7 +162,7 @@ VolumeInfo CreateTestingVolumeInfo(const base::FilePath& path,
volume_info.mount_path = path;
volume_info.mount_condition = chromeos::disks::MOUNT_CONDITION_NONE;
volume_info.is_parent = false;
- volume_info.is_read_only = false;
+ volume_info.is_read_only = read_only;
volume_info.has_media = false;
volume_info.volume_id = GenerateVolumeId(volume_info);
return volume_info;
@@ -390,10 +391,12 @@ bool VolumeManager::RegisterDownloadsDirectoryForTesting(
void VolumeManager::AddVolumeInfoForTesting(const base::FilePath& path,
VolumeType volume_type,
- chromeos::DeviceType device_type) {
+ chromeos::DeviceType device_type,
+ bool read_only) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- DoMountEvent(chromeos::MOUNT_ERROR_NONE,
- CreateTestingVolumeInfo(path, volume_type, device_type));
+ DoMountEvent(
+ chromeos::MOUNT_ERROR_NONE,
+ CreateTestingVolumeInfo(path, volume_type, device_type, read_only));
}
void VolumeManager::OnFileSystemMounted() {
« no previous file with comments | « chrome/browser/chromeos/file_manager/volume_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698