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

Unified Diff: ui/file_manager/file_manager/background/js/file_operation_handler.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_handler.js
diff --git a/ui/file_manager/file_manager/background/js/file_operation_handler.js b/ui/file_manager/file_manager/background/js/file_operation_handler.js
index 1610bd00b50e30ef4c298235bba92ff626e5fb32..c3dd81be77c703f521c720c140d61996191ee086 100644
--- a/ui/file_manager/file_manager/background/js/file_operation_handler.js
+++ b/ui/file_manager/file_manager/background/js/file_operation_handler.js
@@ -6,13 +6,13 @@
/**
* An event handler of the background page for file operations.
- * @param {Window} background Background page.
+ * @param {FileBrowserBackground} background Background page.
* @constructor
*/
var FileOperationHandler = function(background) {
/**
* Background page.
- * @type {Window}
+ * @type {FileBrowserBackground}
* @private
*/
this.background_ = background;
@@ -67,7 +67,7 @@ FileOperationHandler.PENDING_TIME_MS_ = 500;
/**
* Generate a progress message from the event.
- * @param {Event} event Progress event.
+ * @param {FileOperationProgressEvent} event Progress event.
* @return {string} message.
* @private
*/
@@ -128,6 +128,7 @@ FileOperationHandler.getMessage_ = function(event) {
* @private
*/
FileOperationHandler.getDeleteMessage_ = function(event) {
+ event = /** @type {FileOperationProgressEvent} */ (event);
if (event.reason === 'ERROR') {
return str('DELETE_ERROR');
} else if (event.entries.length == 1) {
@@ -164,6 +165,7 @@ FileOperationHandler.getType_ = function(operationType) {
* @private
*/
FileOperationHandler.prototype.onCopyProgress_ = function(event) {
+ event = /** @type {FileOperationProgressEvent} */ (event);
// If the copy is finished, may be we can close the background page.
if (event.reason !== 'BEGIN' && event.reason !== 'PROGRESS')
this.background_.tryClose();
@@ -230,6 +232,7 @@ FileOperationHandler.prototype.onCopyProgress_ = function(event) {
* @private
*/
FileOperationHandler.prototype.onDeleteProgress_ = function(event) {
+ event = /** @type {FileOperationProgressEvent} */ (event);
// If the copy is finished, may be we can close the background page.
if (event.reason !== 'BEGIN' && event.reason !== 'PROGRESS')
this.background_.tryClose();

Powered by Google App Engine
This is Rietveld 408576698