| Index: ui/file_manager/file_manager/foreground/js/file_manager.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| index 7ca5611b8c2bc898bda5fb5334d95bb1f5b982ea..2b085820892260eef9becca32167a25f5d738a2c 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| @@ -3026,23 +3026,17 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| var bytesTotal = 0;
|
| var bytesDone = 0;
|
|
|
| - var onFileTransfersUpdated = function(statusList) {
|
| - for (var index = 0; index < statusList.length; index++) {
|
| - var status = statusList[index];
|
| - var escaped = encodeURI(status.fileUrl);
|
| - if (!(escaped in progressMap)) continue;
|
| - if (status.total == -1) continue;
|
| -
|
| - var old = progressMap[escaped];
|
| - if (old == -1) {
|
| - // -1 means we don't know file size yet.
|
| - bytesTotal += status.total;
|
| - filesStarted++;
|
| - old = 0;
|
| - }
|
| - bytesDone += status.processed - old;
|
| - progressMap[escaped] = status.processed;
|
| + var onFileTransfersUpdated = function(status) {
|
| + var escaped = encodeURI(status.fileUrl);
|
| + var old = progressMap[escaped];
|
| + if (old == -1) {
|
| + // -1 means we don't know file size yet.
|
| + bytesTotal += status.total;
|
| + filesStarted++;
|
| + old = 0;
|
| }
|
| + bytesDone += status.processed - old;
|
| + progressMap[escaped] = status.processed;
|
|
|
| var percent = bytesTotal == 0 ? 0 : bytesDone / bytesTotal;
|
| // For files we don't have information about, assume the progress is zero.
|
|
|