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

Unified Diff: chrome/browser/resources/file_manager/js/volume_manager.js

Issue 10735031: Fixing bug with initialization volumes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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: 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');
}
« 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