Chromium Code Reviews| Index: chrome/browser/resources/file_manager/js/directory_model.js |
| diff --git a/chrome/browser/resources/file_manager/js/directory_model.js b/chrome/browser/resources/file_manager/js/directory_model.js |
| index 0bdf1457307fba6be667f47093bf21441b64511a..0ad04f752d5c2bad59ecc6f315196cef03beb218 100644 |
| --- a/chrome/browser/resources/file_manager/js/directory_model.js |
| +++ b/chrome/browser/resources/file_manager/js/directory_model.js |
| @@ -76,6 +76,8 @@ DirectoryModel.prototype.__proto__ = cr.EventTarget.prototype; |
| DirectoryModel.prototype.start = function() { |
| var volumesChangeHandler = this.onMountChanged_.bind(this); |
| this.volumeManager_.addEventListener('change', volumesChangeHandler); |
| + this.volumeManager_.addEventListener('gdata-status-changed', |
| + this.onGDataStatusChanged_.bind(this)); |
| this.updateRoots_(); |
| }; |
| @@ -1083,7 +1085,7 @@ DirectoryModel.prototype.updateRootsListSelection_ = function() { |
| }; |
| /** |
| - * @return {boolean} True if GDATA if fully mounted. |
| + * @return {boolean} True if GDATA is fully mounted. |
| * @private |
| */ |
| DirectoryModel.prototype.isGDataMounted_ = function() { |
| @@ -1092,7 +1094,7 @@ DirectoryModel.prototype.isGDataMounted_ = function() { |
| }; |
| /** |
| - * Handler for the VolumeManager's event. |
| + * Handler for the VolumeManager's 'change' event. |
| * @private |
| */ |
| DirectoryModel.prototype.onMountChanged_ = function() { |
| @@ -1104,10 +1106,13 @@ DirectoryModel.prototype.onMountChanged_ = function() { |
| !this.volumeManager_.isMounted(this.getCurrentRootPath())) { |
| this.changeDirectory(this.getDefaultDirectory()); |
| } |
| +}; |
| - if (rootType != RootType.GDATA) |
|
SeRya
2012/10/19 11:00:25
The removed condition was essential. You mustn't d
Vladislav Kaznacheev
2012/10/19 13:48:40
Done.
|
| - return; |
| - |
| +/** |
| + * Handler for the VolumeManager's 'gdata-status-changed' event. |
| + * @private |
| + */ |
| +DirectoryModel.prototype.onGDataStatusChanged_ = function() { |
| var mounted = this.isGDataMounted_(); |
| if (this.getCurrentDirEntry() == DirectoryModel.fakeGDataEntry_) { |
| if (mounted) { |