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

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

Issue 612303005: Files.app: Remove navigationVolumeMap from the background page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « ui/file_manager/file_manager/background/js/device_handler.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « ui/file_manager/file_manager/background/js/device_handler.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698