Index: ui/file_manager/file_manager/background/js/file_operation_manager.js |
diff --git a/ui/file_manager/file_manager/background/js/file_operation_manager.js b/ui/file_manager/file_manager/background/js/file_operation_manager.js |
index d66e782f3dc890eb0aa30751daf3c47aab17695d..fa661e8f0baf1297c3d5ab36503cf56d3b317364 100644 |
--- a/ui/file_manager/file_manager/background/js/file_operation_manager.js |
+++ b/ui/file_manager/file_manager/background/js/file_operation_manager.js |
@@ -1186,7 +1186,7 @@ FileOperationManager.prototype.requestTaskCancel = function(taskId) { |
* if the operation is "copy") false. |
hirono
2014/09/16 08:12:56
Please update JSDoc.
iseki
2014/09/16 08:44:20
Done.
|
*/ |
FileOperationManager.prototype.paste = function( |
- sourceEntries, targetEntry, isMove) { |
+ sourceEntries, targetEntry, isMove, taskId) { |
// Do nothing if sourceEntries is empty. |
if (sourceEntries.length === 0) |
return; |
@@ -1220,7 +1220,7 @@ FileOperationManager.prototype.paste = function( |
if (filteredEntries.length === 0) |
return; |
- this.queueCopy_(targetEntry, filteredEntries, isMove); |
+ this.queueCopy_(targetEntry, filteredEntries, isMove, taskId); |
}.bind(this)); |
}; |
@@ -1234,7 +1234,7 @@ FileOperationManager.prototype.paste = function( |
* @private |
hirono
2014/09/16 08:12:56
ditto.
iseki
2014/09/16 08:44:20
Done.
|
*/ |
FileOperationManager.prototype.queueCopy_ = function( |
- targetDirEntry, entries, isMove) { |
+ targetDirEntry, entries, isMove, taskId) { |
var task; |
if (isMove) { |
// When moving between different volumes, moving is implemented as a copy |
@@ -1250,7 +1250,10 @@ FileOperationManager.prototype.queueCopy_ = function( |
task = new FileOperationManager.CopyTask(entries, targetDirEntry, false); |
} |
- task.taskId = this.generateTaskId_(); |
+ if (taskId) |
+ task.taskId = taskId; |
+ else |
+ task.taskId = this.generateTaskId_(); |
this.eventRouter_.sendProgressEvent('BEGIN', task.getStatus(), task.taskId); |
task.initialize(function() { |
this.copyTasks_.push(task); |