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

Unified Diff: ui/file_manager/file_manager/background/js/volume_info_impl.js

Issue 2503513003: Show a label to describe some invalid drag-drop operations in Files app. (Closed)
Patch Set: Fix test failure of FileManagerJsTest.DirectoryTreeTest. Created 4 years 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: ui/file_manager/file_manager/background/js/volume_info_impl.js
diff --git a/ui/file_manager/file_manager/background/js/volume_info_impl.js b/ui/file_manager/file_manager/background/js/volume_info_impl.js
index 71ec24374a0a0e6fd28dd3f8982d998eb33487cb..c2904b73c5d8df5fb3d78a5d0f895c860661ea11 100644
--- a/ui/file_manager/file_manager/background/js/volume_info_impl.js
+++ b/ui/file_manager/file_manager/background/js/volume_info_impl.js
@@ -20,6 +20,8 @@
* @param {(string|undefined)} devicePath Identifier of the device that the
* volume belongs to. Can be undefined.
* @param {boolean} isReadOnly True if the volume is read only.
+ * @param {boolean} isReadOnlyRemovableDevice True if the volume is read only
+ * removable device.
* @param {!{displayName:string, isCurrentProfile:boolean}} profile Profile
* information.
* @param {string} label Label of the volume.
@@ -38,6 +40,7 @@ function VolumeInfoImpl(
deviceType,
devicePath,
isReadOnly,
+ isReadOnlyRemovableDevice,
profile,
label,
extensionId,
@@ -83,6 +86,7 @@ function VolumeInfoImpl(
this.deviceType_ = deviceType;
this.devicePath_ = devicePath;
this.isReadOnly_ = isReadOnly;
+ this.isReadOnlyRemovableDevice_ = isReadOnlyRemovableDevice;
this.profile_ = Object.freeze(profile);
this.extensionId_ = extensionId;
this.hasMedia_ = hasMedia;
@@ -148,6 +152,12 @@ VolumeInfoImpl.prototype = /** @struct */ {
return this.isReadOnly_;
},
/**
+ * @return {boolean} Whether the device is read-only removable device or not.
+ */
+ get isReadOnlyRemovableDevice() {
+ return this.isReadOnlyRemovableDevice_;
+ },
+ /**
* @return {!{displayName:string, isCurrentProfile:boolean}} Profile data.
*/
get profile() {

Powered by Google App Engine
This is Rietveld 408576698