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

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

Issue 2451713002: Propagate the read_only_hardware flag of volumes to js. (Closed)
Patch Set: Fix comment. Created 4 years, 2 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/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 e2274225166fd9456d81a893f96ae44046620158..fdcc0430b21044421e9e8d6672d86447d316c7fd 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager.cc
@@ -151,6 +151,7 @@ Volume::Volume()
mount_context_(MOUNT_CONTEXT_UNKNOWN),
is_parent_(false),
is_read_only_(false),
+ is_read_only_hardware_(false),
has_media_(false),
configurable_(false),
watchable_(false) {
@@ -207,10 +208,11 @@ Volume* Volume::CreateForRemovable(
volume->system_path_prefix_ = base::FilePath(disk->system_path_prefix());
volume->is_parent_ = disk->is_parent();
volume->is_read_only_ = disk->is_read_only();
+ volume->is_read_only_hardware_ = disk->is_read_only_hardware();
volume->has_media_ = disk->has_media();
} else {
volume->device_type_ = chromeos::DEVICE_TYPE_UNKNOWN;
- volume->is_read_only_ =
+ volume->is_read_only_ = volume->is_read_only_hardware_ =
fukino 2016/10/27 05:27:34 Should is_read_only_hardware_ be true? The archive
yamaguchi 2016/10/27 07:32:54 Now that we state the is_read_only_device field is
(mount_point.mount_type == chromeos::MOUNT_TYPE_ARCHIVE);
}
volume->volume_id_ = GenerateVolumeId(*volume);
@@ -244,6 +246,7 @@ Volume* Volume::CreateForProvidedFileSystem(
volume->mount_context_ = mount_context;
volume->is_parent_ = true;
volume->is_read_only_ = !file_system_info.writable();
+ volume->is_read_only_hardware_ = volume->is_read_only_;
fukino 2016/10/27 05:27:34 ditto. FPS volumes are not necessary haredware.
yamaguchi 2016/10/27 07:32:54 Done.
volume->configurable_ = file_system_info.configurable();
volume->watchable_ = file_system_info.watchable();
volume->volume_id_ = GenerateVolumeId(*volume);

Powered by Google App Engine
This is Rietveld 408576698