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

Unified Diff: chrome/browser/resources/ntp4/suggestions_page.js

Issue 10647003: Discovery API supports specifying a tile in a URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified experimental discovery API documentation. Created 8 years, 5 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/ntp4/suggestions_page.js
diff --git a/chrome/browser/resources/ntp4/suggestions_page.js b/chrome/browser/resources/ntp4/suggestions_page.js
index 4e4f0d63d5fe197fe4a873d91af7fa03f2b73fc2..2a328a07ee29974d23891768c5ed960265d48a2b 100644
--- a/chrome/browser/resources/ntp4/suggestions_page.js
+++ b/chrome/browser/resources/ntp4/suggestions_page.js
@@ -109,7 +109,12 @@ cr.define('ntp', function() {
// Sets the tooltip.
this.title = data.title;
- var thumbnailUrl = 'chrome://thumb/' + data.url;
+ var thumbnailUrl;
+ if (data.urlImage) {
Evan Stade 2012/07/26 04:26:02 use ternary operator
beaudoin 2012/07/26 17:08:37 Done.
+ thumbnailUrl = data.urlImage;
+ } else {
+ thumbnailUrl = 'chrome://thumb/' + data.url;
+ }
this.querySelector('.thumbnail').style.backgroundImage =
url(thumbnailUrl);

Powered by Google App Engine
This is Rietveld 408576698