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

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

Issue 973483002: Files.app: Mitigate performance issue on select-all by prefetching content mime type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment about performance optimization, and attached a link to crbug. 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 | « ui/file_manager/file_manager/foreground/js/file_selection.js ('k') | 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/file_transfer_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
index 5ef1622cb1c61bb221ed04b94f73b89926399da7..26acbe0f16b1a38541735665f7dd06f15f2179c9 100644
--- a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
@@ -1093,9 +1093,11 @@ FileTransferController.prototype.onFileSelectionChangedThrottled_ = function() {
// asynchronous operations.
if (!containsDirectory) {
for (var i = 0; i < fileEntries.length; i++) {
- fileEntries[i].file(function(data, file) {
- data.file = file;
- }.bind(null, asyncData[fileEntries[i].toURL()]));
+ (function(fileEntry) {
+ fileEntry.file(function(file) {
+ asyncData[fileEntry.toURL()].file = file;
+ });
+ })(fileEntries[i]);
}
}
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_selection.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698