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

Unified Diff: ui/file_manager/file_manager/foreground/js/directory_model.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/foreground/js/directory_model.js
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index ec44c1e6e7f6bf02507e3ca488cc4e1b600852f8..ac3751d1daa8eca461d51f1456d40fb208ea5106 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -284,7 +284,7 @@ DirectoryModel.prototype.getLeadEntry_ = function() {
DirectoryModel.prototype.setLeadEntry_ = function(value) {
var fileList = this.getFileList();
for (var i = 0; i < fileList.length; i++) {
- if (util.isSameEntry(fileList.item(i), value)) {
+ if (util.isSameEntry(/** @type {Entry} */ (fileList.item(i)), value)) {
this.fileListSelection_.leadIndex = i;
return;
}
@@ -713,7 +713,7 @@ DirectoryModel.prototype.onEntriesChanged = function(kind, entries) {
DirectoryModel.prototype.findIndexByEntry_ = function(entry) {
var fileList = this.getFileList();
for (var i = 0; i < fileList.length; i++) {
- if (util.isSameEntry(fileList.item(i), entry))
+ if (util.isSameEntry(/** @type {Entry} */ (fileList.item(i)), entry))
return i;
}
return -1;
@@ -859,7 +859,7 @@ DirectoryModel.prototype.changeDirectoryEntry = function(
// Notify that the current task of this.directoryChangeQueue_
// is completed.
- setTimeout(queueTaskCallback);
+ setTimeout(queueTaskCallback, 0);
});
// For tests that open the dialog to empty directories, everything
@@ -957,7 +957,7 @@ DirectoryModel.prototype.selectEntry = function(entry) {
};
/**
- * @param {Array.<string>} entries Array of entries.
+ * @param {Array.<Entry>} entries Array of entries.
*/
DirectoryModel.prototype.selectEntries = function(entries) {
// URLs are needed here, since we are comparing Entries by URLs.

Powered by Google App Engine
This is Rietveld 408576698