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

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

Issue 1142593002: Generalize volume configuration over all volumes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the configure test. Created 5 years, 7 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: 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);
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/file_manager/file_manager/foreground/js/file_manager_commands.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698