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

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

Issue 937423002: Revert of Dispatch directory-changed event before rescan starts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 20ef2123a377aa7f761057367c90214c6b9498a9..1bb990a71e9a11abbb112bce566e571befe92efe 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -919,10 +919,24 @@
var previousDirEntry =
this.currentDirContents_.getDirectoryEntry();
+ this.clearAndScan_(
+ newDirectoryContents,
+ function(result) {
+ // Calls the callback of the method when successful.
+ if (result && opt_callback)
+ opt_callback();
+
+ // Notify that the current task of this.directoryChangeQueue_
+ // is completed.
+ setTimeout(queueTaskCallback, 0);
+ });
+
+ // For tests that open the dialog to empty directories, everything
+ // is loaded at this point.
+ util.testSendMessage('directory-change-complete');
var previousVolumeInfo =
previousDirEntry ?
this.volumeManager_.getVolumeInfo(previousDirEntry) : null;
-
// VolumeInfo for dirEntry.
var currentVolumeInfo = this.getCurrentVolumeInfo();
var event = new Event('directory-changed');
@@ -930,22 +944,6 @@
event.newDirEntry = dirEntry;
event.volumeChanged = previousVolumeInfo !== currentVolumeInfo;
this.dispatchEvent(event);
-
- this.clearAndScan_(
- newDirectoryContents,
- function(result) {
- // Calls the callback of the method when successful.
- if (result && opt_callback)
- opt_callback();
-
- // Notify that the current task of this.directoryChangeQueue_
- // is completed.
- setTimeout(queueTaskCallback, 0);
- });
-
- // For tests that open the dialog to empty directories, everything
- // is loaded at this point.
- util.testSendMessage('directory-change-complete');
}.bind(this));
}.bind(this, this.changeDirectorySequence_));
};
« 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