Index: chrome/browser/resources/file_manager/js/volume_manager.js |
diff --git a/chrome/browser/resources/file_manager/js/volume_manager.js b/chrome/browser/resources/file_manager/js/volume_manager.js |
index 4f02c97eb4f1c0d17cc1dec996a4a02077edcdf4..0a95574cc48fa4a95d090a5f3cec4728fd0fccec 100644 |
--- a/chrome/browser/resources/file_manager/js/volume_manager.js |
+++ b/chrome/browser/resources/file_manager/js/volume_manager.js |
@@ -24,8 +24,6 @@ function VolumeManager() { |
this.mountedVolumes_ = {}; |
this.initMountPoints_(); |
- chrome.fileBrowserPrivate.onMountCompleted.addListener( |
- this.onMountCompleted_.bind(this)); |
this.gDataStatus_ = VolumeManager.GDataStatus.UNMOUNTED; |
} |
@@ -134,6 +132,11 @@ VolumeManager.prototype.initMountPoints_ = function() { |
var volume = mountedVolumes[i]; |
self.mountedVolumes_[volume.mountPath] = volume; |
} |
+ |
+ // Subscribe to the mount completed event when mount points initialized. |
+ chrome.fileBrowserPrivate.onMountCompleted.addListener( |
+ self.onMountCompleted_.bind(self)); |
+ |
if (mountedVolumes.length > 0) |
cr.dispatchSimpleEvent(self, 'change'); |
} |