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 8faa2387f632f9cce3540836d8979796c4ac58cd..0c0e6c8d516765b5d9bbe443e070356b638c3f33 100644 |
--- a/ui/file_manager/file_manager/background/js/volume_manager.js |
+++ b/ui/file_manager/file_manager/background/js/volume_manager.js |
@@ -852,7 +852,7 @@ VolumeManager.prototype.mountArchive = function( |
}; |
/** |
- * Unmounts volume. |
+ * Unmounts a volume. |
* @param {!VolumeInfo} volumeInfo Volume to be unmounted. |
* @param {function()} successCallback Success callback. |
* @param {function(VolumeManagerCommon.VolumeError)} errorCallback Error |
@@ -866,6 +866,25 @@ VolumeManager.prototype.unmount = function(volumeInfo, |
this.startRequest_(requestKey, successCallback, errorCallback); |
}; |
+/** |
+ * Configures a volume. |
+ * @param {!VolumeInfo} volumeInfo Volume to be configured. |
+ * @return {!Promise} Fulfilled on success, otherwise rejected with an error |
+ * message. |
+ */ |
+VolumeManager.prototype.configure = function(volumeInfo) { |
+ return new Promise(function(fulfill, reject) { |
+ chrome.fileManagerPrivate.configureVolume( |
+ volumeInfo.volumeId, |
+ function() { |
+ if (chrome.runtime.lastError) |
+ reject(chrome.runtime.lastError.message); |
+ else |
+ fulfill(); |
+ }); |
+ }); |
+}; |
+ |
/** @override */ |
VolumeManager.prototype.getVolumeInfo = function(entry) { |
return this.volumeInfoList.findByEntry(entry); |