Chromium Code Reviews| Index: chrome/renderer/resources/extensions/searchbox_api.js |
| diff --git a/chrome/renderer/resources/extensions/searchbox_api.js b/chrome/renderer/resources/extensions/searchbox_api.js |
| index 8a21d03203c9ac63829d20aad4507a5a1bfa1e2d..363abac41db824a7aae21d267042ae25f56cadf6 100644 |
| --- a/chrome/renderer/resources/extensions/searchbox_api.js |
| +++ b/chrome/renderer/resources/extensions/searchbox_api.js |
| @@ -258,16 +258,24 @@ if (!chrome.embeddedSearch) { |
| function GetMostVisitedItemsWrapper() { |
| var mostVisitedItems = GetMostVisitedItems(); |
| for (var i = 0, item; item = mostVisitedItems[i]; ++i) { |
| + item.faviconUrl = UpdateFaviconUrl(item.renderViewId, item.rid); |
| // These properties are private data and should not be returned to |
| // the page. They are only accessible via getMostVisitedItemData(). |
| item.url = null; |
| item.title = null; |
| item.domain = null; |
| item.direction = null; |
| + item.renderViewId = null; |
|
samarth
2013/06/20 00:31:29
Might as well also delete item.rid since that's no
pedro (no code reviews)
2013/06/20 22:43:45
As discussed offline, we actually need the rid, so
|
| } |
| return mostVisitedItems; |
| } |
| + function UpdateFaviconUrl(renderViewId, rid) { |
|
samarth
2013/06/20 00:31:29
CreateFaviconUrl or ConstructFaviconUrl
pedro (no code reviews)
2013/06/20 22:43:45
Renamed to GenerateThumbnailURL to keep consistenc
|
| + return "chrome-search://favicon/size/16@" + |
| + window.devicePixelRatio + "x/" + |
| + renderViewId + "/" + rid; |
| + } |
| + |
| // ======================================================================= |
| // Exported functions |
| // ======================================================================= |