Chromium Code Reviews| Index: chrome/browser/resources/local_ntp/most_visited_single.js |
| diff --git a/chrome/browser/resources/local_ntp/most_visited_single.js b/chrome/browser/resources/local_ntp/most_visited_single.js |
| index 0e55a5a932f7cf713e547f9e88c9d9c2865c9547..c41d35c7afafa8c4be01f5b623cde32572ae1a8c 100644 |
| --- a/chrome/browser/resources/local_ntp/most_visited_single.js |
| +++ b/chrome/browser/resources/local_ntp/most_visited_single.js |
| @@ -277,9 +277,13 @@ var addTile = function(args) { |
| if (args.rid) { |
| var data = chrome.embeddedSearch.searchBox.getMostVisitedItemData(args.rid); |
| data.tid = data.rid; |
| - data.thumbnailUrls = [data.thumbnailUrl]; |
| - data.faviconUrl = 'chrome-search://favicon/size/16@' + |
| - window.devicePixelRatio + 'x/' + data.renderViewId + '/' + data.tid; |
| + if (data.thumbnailUrl) { |
| + data.thumbnailUrls = [data.thumbnailUrl]; |
|
Mathieu
2015/07/28 13:32:42
should we make sure data.thumbnailUrls is not unde
fserb
2015/07/28 17:55:29
Done.
|
| + } |
| + if (!data.faviconUrl) { |
| + data.faviconUrl = 'chrome-search://favicon/size/16@' + |
| + window.devicePixelRatio + 'x/' + data.renderViewId + '/' + data.tid; |
| + } |
| tiles.appendChild(renderTile(data)); |
| logEvent(LOG_TYPE.NTP_CLIENT_SIDE_SUGGESTION); |
| } else if (args.id) { |