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

Unified Diff: chrome/browser/resources/print_preview/search/destination_list.js

Issue 2865633004: Fix all remaining print preview closure compiler errors (Closed)
Patch Set: Fix onkeydown function Created 3 years, 7 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: chrome/browser/resources/print_preview/search/destination_list.js
diff --git a/chrome/browser/resources/print_preview/search/destination_list.js b/chrome/browser/resources/print_preview/search/destination_list.js
index 89b8163ea99404e26e3834e409707154b1435a90..9b9647a00bf39eb3414b75b50c2300473f3cf6c5 100644
--- a/chrome/browser/resources/print_preview/search/destination_list.js
+++ b/chrome/browser/resources/print_preview/search/destination_list.js
@@ -84,7 +84,7 @@ cr.define('print_preview', function() {
* @private
*/
this.listItems_ = [];
- };
+ }
/**
* Enumeration of event types dispatched by the destination list.
@@ -262,7 +262,7 @@ cr.define('print_preview', function() {
this.renderDestinationsList_(this.destinations_);
} else {
var filteredDests = this.destinations_.filter(function(destination) {
- return destination.matches(this.query_);
+ return destination.matches(assert(this.query_));
}, this);
this.renderDestinationsList_(filteredDests);
}
@@ -308,13 +308,14 @@ cr.define('print_preview', function() {
var listEl = this.getChildElement('.destination-list > ul');
var focusedEl = listEl.querySelector(':focus');
for (var i = 0; i < numItems; i++) {
- var listItem = visibleListItems[destinations[i].id];
+ var destination = assert(destinations[i]);
+ var listItem = visibleListItems[destination.id];
if (listItem) {
// Destination ID is the same, but it can be registered to a different
// user account, hence passing it to the item update.
- this.updateListItem_(listEl, listItem, focusedEl, destinations[i]);
+ this.updateListItem_(listEl, listItem, focusedEl, destination);
} else {
- this.renderListItem_(listEl, destinations[i]);
+ this.renderListItem_(listEl, destination);
}
}
},
@@ -353,7 +354,7 @@ cr.define('print_preview', function() {
var listItem = new print_preview.DestinationListItem(
this.eventTarget_, destination, this.query_);
this.addChild(listItem);
- listItem.render(listEl);
+ listItem.render(assert(listEl));
this.listItems_.push(listItem);
},

Powered by Google App Engine
This is Rietveld 408576698