| Index: chrome/browser/resources/file_manager/js/async_util.js
|
| diff --git a/chrome/browser/resources/file_manager/js/async_util.js b/chrome/browser/resources/file_manager/js/async_util.js
|
| index 9b7639b5f40de0131bb58e8aeb9845b8165f7481..f74a9d493810a66f18f1bb0705665d0dfe80ad0e 100644
|
| --- a/chrome/browser/resources/file_manager/js/async_util.js
|
| +++ b/chrome/browser/resources/file_manager/js/async_util.js
|
| @@ -53,6 +53,13 @@ AsyncUtil.Queue = function() {
|
| };
|
|
|
| /**
|
| + * @return {boolean} True when a task is running, otherwise false.
|
| + */
|
| +AsyncUtil.Queue.prototype.isRunning = function() {
|
| + return this.running_;
|
| +};
|
| +
|
| +/**
|
| * Enqueues a closure to be executed.
|
| * @param {function(function())} closure Closure with a completion callback to
|
| * be executed.
|
| @@ -80,6 +87,14 @@ AsyncUtil.Queue.prototype.continue_ = function() {
|
| };
|
|
|
| /**
|
| + * Cancels all pending tasks. Note that this does NOT cancel the task running
|
| + * currently.
|
| + */
|
| +AsyncUtil.Queue.prototype.cancel = function() {
|
| + this.closures_ = [];
|
| +};
|
| +
|
| +/**
|
| * Creates a class for executing several asynchronous closures in a group in
|
| * a dependency order.
|
| *
|
|
|