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

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

Issue 651403002: Fix trivial type-check errors in file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and correct a comment. Created 6 years, 2 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/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 a4727cabd52d59d131d16ff6b514cf42f5d4c7b8..7bed2f3075e2a8ada1b2947368b03c1532c347f2 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
@@ -413,7 +413,8 @@ FileOperationManager.EventRouter.prototype.sendProgressEvent = function(
if (reason === 'SUCCESS' || reason === 'CANCELED')
this.entryChangedEventRateLimiter_.runImmediately();
- var event = new Event('copy-progress');
+ var event = /** @type {FileOperationProgressEvent} */
+ (new Event('copy-progress'));
event.reason = reason;
event.status = status;
event.taskId = taskId;
@@ -470,7 +471,7 @@ FileOperationManager.EventRouter.prototype.dispatchEntryChangedEvent_ =
*/
FileOperationManager.EventRouter.prototype.sendDeleteEvent = function(
reason, task) {
- var event = new Event('delete');
+ var event = /** @type {FileOperationProgressEvent} */ (new Event('delete'));
event.reason = reason;
event.taskId = task.taskId;
event.entries = task.entries;
@@ -531,7 +532,7 @@ FileOperationManager.Task = function(
/**
* Callback to cancel the running process.
- * @private {function()}
+ * @private {?function()}
*/
this.cancelCallback_ = null;
@@ -953,7 +954,7 @@ FileOperationManager.MoveTask.prototype.run = function(
* Moves the sourceEntry to the targetDirEntry in this task.
*
* @param {Entry} sourceEntry An entry to be moved.
- * @param {DirectoryEntry} destinationEntry The entry of the destination
+ * @param {!DirectoryEntry} destinationEntry The entry of the destination
* directory.
* @param {function(util.EntryChangedKind, Entry)} entryChangedCallback
* Callback invoked when an entry is changed.
@@ -1457,7 +1458,7 @@ FileOperationManager.prototype.serviceDeleteTask_ = function(task, callback) {
/**
* Creates a zip file for the selection of files.
*
- * @param {Entry} dirEntry The directory containing the selection.
+ * @param {!DirectoryEntry} dirEntry The directory containing the selection.
* @param {Array.<Entry>} selectionEntries The selected entries.
*/
FileOperationManager.prototype.zipSelection = function(

Powered by Google App Engine
This is Rietveld 408576698