Index: ui/file_manager/file_manager/background/js/volume_manager.js |
diff --git a/ui/file_manager/file_manager/background/js/volume_manager.js b/ui/file_manager/file_manager/background/js/volume_manager.js |
index 23f6469a0ebf3a6a73b0f23a71c0bad9af51f818..a51d3d91d7eea3cdd89179c5fe016628c7475a7f 100644 |
--- a/ui/file_manager/file_manager/background/js/volume_manager.js |
+++ b/ui/file_manager/file_manager/background/js/volume_manager.js |
@@ -12,9 +12,11 @@ |
* @param {string} volumeId ID of the volume. |
* @param {DOMFileSystem} fileSystem The file system object for this volume. |
* @param {string} error The error if an error is found. |
- * @param {string} deviceType The type of device ('usb'|'sd'|'optical'|'mobile' |
+ * @param {?string} deviceType The type of device ('usb'|'sd'|'optical'|'mobile' |
* |'unknown') (as defined in chromeos/disks/disk_mount_manager.cc). |
* Can be null. |
+ * @param {?string} devicePath Identifier of the device that the volume belongs |
+ * to. Can be null. |
* @param {boolean} isReadOnly True if the volume is read only. |
* @param {!{displayName:string, isCurrentProfile:boolean}} profile Profile |
* information. |
@@ -29,6 +31,7 @@ function VolumeInfo( |
fileSystem, |
error, |
deviceType, |
+ devicePath, |
isReadOnly, |
profile, |
label, |
@@ -66,6 +69,7 @@ function VolumeInfo( |
// TODO(hidehiko): Rename to make this more understandable. |
this.error_ = error; |
this.deviceType_ = deviceType; |
+ this.devicePath_ = devicePath; |
this.isReadOnly_ = isReadOnly; |
this.profile_ = Object.freeze(profile); |
this.extensionId_ = extensionId; |
@@ -118,6 +122,12 @@ VolumeInfo.prototype = { |
return this.deviceType_; |
}, |
/** |
+ * @return {string} Device identifier. |
+ */ |
+ get devicePath() { |
+ return this.devicePath_; |
+ }, |
+ /** |
* @return {boolean} Whether read only or not. |
*/ |
get isReadOnly() { |
@@ -233,6 +243,7 @@ volumeManagerUtil.createVolumeInfo = function(volumeMetadata, callback) { |
null, // File system is not found. |
volumeMetadata.mountCondition, |
volumeMetadata.deviceType, |
+ volumeMetadata.devicePath, |
volumeMetadata.isReadOnly, |
volumeMetadata.profile, |
localizedLabel, |
@@ -259,6 +270,7 @@ volumeManagerUtil.createVolumeInfo = function(volumeMetadata, callback) { |
fileSystem, |
volumeMetadata.mountCondition, |
volumeMetadata.deviceType, |
+ volumeMetadata.devicePath, |
volumeMetadata.isReadOnly, |
volumeMetadata.profile, |
localizedLabel, |