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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_transfer_controller.js

Issue 1010163002: Files.app: Fix closure error which will raised by the updated compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define FakeEntry record type and use it. Created 5 years, 9 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/foreground/js/file_transfer_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
index f5e179223b7d36eaee44acce2dfe7c4b657bed1a..8623009e34ee1bb4fec290f3e8c3cd98bc627fe8 100644
--- a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
@@ -482,7 +482,8 @@ FileTransferController.prototype.paste =
(!util.isDropEffectAllowed(effectAllowed, 'copy') ||
opt_effect === 'move');
var destinationEntry =
- opt_destinationEntry || this.directoryModel_.getCurrentDirEntry();
+ opt_destinationEntry ||
+ /** @type {DirectoryEntry} */ (this.directoryModel_.getCurrentDirEntry());
var entries = [];
var failureUrls;
var taskId = this.fileOperationManager_.generateTaskId();
@@ -850,7 +851,8 @@ FileTransferController.prototype.onDrop_ =
if (!this.canPasteOrDrop_(event.dataTransfer, destinationEntry))
return;
event.preventDefault();
- this.paste(event.dataTransfer, destinationEntry,
+ this.paste(event.dataTransfer,
+ /** @type {DirectoryEntry} */ (destinationEntry),
this.selectDropEffect_(event, destinationEntry));
this.clearDropTarget_();
};
@@ -1055,7 +1057,7 @@ FileTransferController.prototype.onBeforePaste_ = function(event) {
/**
* @param {!ClipboardData} clipboardData Clipboard data object.
- * @param {DirectoryEntry} destinationEntry Destination entry.
+ * @param {DirectoryEntry|FakeEntry} destinationEntry Destination entry.
* @return {boolean} Returns true if items stored in {@code clipboardData} can
* be pasted to {@code destinationEntry}. Otherwise, returns false.
* @private
@@ -1175,7 +1177,7 @@ FileTransferController.prototype.onFileSelectionChangedThrottled_ = function() {
/**
* @param {!Event} event Drag event.
- * @param {DirectoryEntry} destinationEntry Destination entry.
+ * @param {DirectoryEntry|FakeEntry} destinationEntry Destination entry.
* @return {string} Returns the appropriate drop query type ('none', 'move'
* or copy') to the current modifiers status and the destination.
* @private

Powered by Google App Engine
This is Rietveld 408576698