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

Unified Diff: chrome/browser/resources/local_ntp/most_visited_single.js

Issue 1260113002: Adds an experiment that enabled SuggestionsService suggestions (MostLikely) on LocalNTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/search/instant_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 028f57d8044d1fb0896735814bbcc5e7926c8be0..012abdb02fdf315a84a283e4b54fa2da95563c8f 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.thumbnailUrls) {
+ data.thumbnailUrls = [data.thumbnailUrl];
+ }
+ 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) {
« no previous file with comments | « no previous file | chrome/browser/search/instant_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698