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

Unified Diff: ui/file_manager/file_manager/background/js/task_queue.js

Issue 964533003: Files.app: Fix task cancellation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
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
Index: ui/file_manager/file_manager/background/js/task_queue.js
diff --git a/ui/file_manager/file_manager/background/js/task_queue.js b/ui/file_manager/file_manager/background/js/task_queue.js
index 26d1ac042e0fc4410f91f6f6471b4a2789f376df..c39022e3004dc74a2d9ef88ae684bbcb4d8307b1 100644
--- a/ui/file_manager/file_manager/background/js/task_queue.js
+++ b/ui/file_manager/file_manager/background/js/task_queue.js
@@ -40,7 +40,7 @@ importer.TaskQueue = function() {
*/
importer.TaskQueue.UpdateType = {
PROGRESS: 'PROGRESS',
- SUCCESS: 'SUCCESS',
+ COMPLETE: 'COMPLETE',
ERROR: 'ERROR',
CANCELED: 'CANCELED'
};
@@ -103,7 +103,8 @@ importer.TaskQueue.prototype.onTaskUpdate_ = function(task, updateType) {
// If the task update is a terminal one, move on to the next task.
var UpdateType = importer.TaskQueue.UpdateType;
- if (updateType === UpdateType.SUCCESS || updateType === UpdateType.ERROR) {
+ if (updateType === UpdateType.COMPLETE ||
+ updateType === UpdateType.CANCELED) {
// Assumption: the currently running task is at the head of the queue.
console.assert(this.tasks_[0] === task,
'Only tasks that are at the head of the queue should be active');
@@ -212,7 +213,7 @@ importer.TaskQueue.BaseTask.prototype.run = function() {};
importer.TaskQueue.BaseTask.prototype.notify = function(updateType, opt_data) {
switch (updateType) {
case importer.TaskQueue.UpdateType.CANCELED:
- case importer.TaskQueue.UpdateType.SUCCESS:
+ case importer.TaskQueue.UpdateType.COMPLETE:
this.finishedResolver_.resolve(updateType);
}

Powered by Google App Engine
This is Rietveld 408576698