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

Unified Diff: ui/file_manager/file_manager/foreground/js/volume_manager_wrapper.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
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/providers_model.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/foreground/js/volume_manager_wrapper.js
diff --git a/ui/file_manager/file_manager/foreground/js/volume_manager_wrapper.js b/ui/file_manager/file_manager/foreground/js/volume_manager_wrapper.js
index 38e3e447e3ee74956e60c222632d6a4f6466e24f..7b4f53a3fb3cd2e39b06f991cc51bd70cdd5e385 100644
--- a/ui/file_manager/file_manager/foreground/js/volume_manager_wrapper.js
+++ b/ui/file_manager/file_manager/foreground/js/volume_manager_wrapper.js
@@ -323,6 +323,24 @@ VolumeManagerWrapper.prototype.unmount = function(
};
/**
+ * Requests configuring of the specified volume.
+ * @param {!VolumeInfo} volumeInfo Volume to be configured.
+ * @return {!Promise} Fulfilled on success, otherwise rejected with an error
+ * message.
+ */
+VolumeManagerWrapper.prototype.configure = function(volumeInfo) {
+ if (this.pendingTasks_) {
+ return new Promise(function(fulfill, reject) {
+ this.pendingTasks_.push(function() {
+ return this.volumeManager_.configure(volumeInfo).then(fulfill, reject);
+ }.bind(this));
+ }.bind(this));
+ }
+
+ return this.volumeManager_.configure(volumeInfo);
+};
+
+/**
* Filters volume info by referring nonNativeEnabled.
*
* @param {VolumeInfo} volumeInfo Volume info.
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/providers_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698