Commit eab6fcca authored by tetsui's avatar tetsui Committed by Commit bot

Update progress center immediately when files are pasted.

URLsToEntriesWithAccess is heavy operation especially on slow storage
devices such as MTP connected ones.
Previously, progress center was updated only after
URLsToEntriesWithAccess was finished. As a result, it took more than 30
seconds for a user to receive feedback in some cases.

BUG=712547
TEST=manually tested.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2846763002
Cr-Commit-Position: refs/heads/master@{#467840}
parent e47392b3
......@@ -548,6 +548,15 @@ FileTransferController.prototype.paste =
var shareEntries;
var taskId = this.fileOperationManager_.generateTaskId();
var item = new ProgressCenterItem();
item.id = taskId;
if (toMove) {
item.message = strf('MOVE_ITEMS_REMAINING', sourceURLs.length);
} else {
item.message = strf('COPY_ITEMS_REMAINING', sourceURLs.length);
}
this.progressCenter_.updateItem(item);
FileTransferController.URLsToEntriesWithAccess(sourceURLs)
.then(
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment