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

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

Issue 11226002: Files app: fixed infinite Google Drive loading spinner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: 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) {
« 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