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

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

Issue 1020113002: Fix initializing volume manager in Files app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | 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 5563cf742174c337a906db7eb5064d22099170b4..6869dc2816549df3873c6bf803252ab2f5eb0713 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager.js
@@ -673,23 +673,23 @@ VolumeManager.prototype.initialize_ = function(callback) {
// volumes in the volumeMetadataList are mounted. crbug.com/135477.
this.mountQueue_.run(function(inCallback) {
// Create VolumeInfo for each volume.
- Promise.all([
- volumeMetadataList.map(function(volumeMetadata) {
- console.debug(
- 'Initializing volume: ' + volumeMetadata.volumeId);
- return this.addVolumeMetadata_(volumeMetadata).then(
- function(volumeInfo) {
- console.debug('Initialized volume: ' + volumeInfo.volumeId);
- });
- }.bind(this))
- ]).then(function() {
- console.debug('Initialized all volumes.');
- // Call the callback of the initialize function.
- callback();
- // Call the callback of AsyncQueue. Maybe it invokes callbacks
- // registered by mountCompleted events.
- inCallback();
- });
+ Promise.all(
+ volumeMetadataList.map(function(volumeMetadata) {
+ console.debug(
+ 'Initializing volume: ' + volumeMetadata.volumeId);
+ return this.addVolumeMetadata_(volumeMetadata).then(
+ function(volumeInfo) {
+ console.debug('Initialized volume: ' + volumeInfo.volumeId);
+ });
+ }.bind(this)))
+ .then(function() {
+ console.debug('Initialized all volumes.');
+ // Call the callback of the initialize function.
+ callback();
+ // Call the callback of AsyncQueue. Maybe it invokes callbacks
+ // registered by mountCompleted events.
+ inCallback();
+ });
}.bind(this));
}.bind(this));
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698