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

Unified Diff: ui/file_manager/file_manager/foreground/js/directory_model.js

Issue 689003002: Fix auto opening FSP volumes on mount. (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 | « 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/foreground/js/directory_model.js
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index c46055c0a921dc9c2a632f38d597482e215449ad..bab8d9e1bd178384d1b52035c96f41a3345f927b 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -1003,10 +1003,12 @@ DirectoryModel.prototype.onVolumeInfoListUpdated_ = function(event) {
// window. Note, that this is a temporary solution for crbug.com/427776.
if (window.isFocused() &&
event.added.length === 1 &&
- event.added[0].volumeType ==
- VolumeManagerCommon.VolumeType.VOLUME_TYPE_PROVIDED &&
- event.added[0].displayRoot) {
- this.changeDirectoryEntry(event.added[0].displayRoot);
+ event.added[0].volumeType === VolumeManagerCommon.VolumeType.PROVIDED) {
+ event.added[0].resolveDisplayRoot().then(function(displayRoot) {
+ // Resolving a display root on FSP volumes is instant, despite the
+ // asynchronous call.
+ this.changeDirectoryEntry(event.added[0].displayRoot);
+ }.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