| Index: chrome/browser/resources/local_ntp/most_visited_thumbnail.js
|
| diff --git a/chrome/browser/resources/local_ntp/most_visited_thumbnail.js b/chrome/browser/resources/local_ntp/most_visited_thumbnail.js
|
| index 4c83e8a26946a8d21a07796fa5982e83d1e2bdc1..5742d6578dd0960b51f12a31c0b47fee92ce2102 100644
|
| --- a/chrome/browser/resources/local_ntp/most_visited_thumbnail.js
|
| +++ b/chrome/browser/resources/local_ntp/most_visited_thumbnail.js
|
| @@ -11,21 +11,13 @@ window.addEventListener('DOMContentLoaded', function() {
|
| 'use strict';
|
|
|
| fillMostVisited(document.location, function(params, data) {
|
| - function logEvent(eventName) {
|
| - chrome.embeddedSearch.newTabPage.logEvent(eventName);
|
| - }
|
| - function logMostVisitedImpression(tileIndex, tileSource) {
|
| - chrome.embeddedSearch.newTabPage.logMostVisitedImpression(tileIndex,
|
| - tileSource);
|
| - }
|
| function displayLink(link) {
|
| document.body.appendChild(link);
|
| window.parent.postMessage('linkDisplayed', '{{ORIGIN}}');
|
| }
|
| function showDomainElement() {
|
| var link = createMostVisitedLink(
|
| - params, data.url, data.title, undefined, data.direction,
|
| - data.tileSource);
|
| + params, data.url, data.title, undefined, data.direction);
|
| var domain = document.createElement('div');
|
| domain.textContent = data.domain;
|
| link.appendChild(domain);
|
| @@ -35,8 +27,7 @@ window.addEventListener('DOMContentLoaded', function() {
|
| // externally by the page itself.
|
| function showEmptyTile() {
|
| displayLink(createMostVisitedLink(
|
| - params, data.url, data.title, undefined, data.direction,
|
| - data.tileSource));
|
| + params, data.url, data.title, undefined, data.direction));
|
| }
|
| // Creates and adds an image.
|
| function createThumbnail(src, imageClass) {
|
| @@ -46,15 +37,13 @@ window.addEventListener('DOMContentLoaded', function() {
|
| }
|
| image.onload = function() {
|
| var link = createMostVisitedLink(
|
| - params, data.url, data.title, undefined, data.direction,
|
| - data.tileSource);
|
| + params, data.url, data.title, undefined, data.direction);
|
| // Use blocker to prevent context menu from showing image-related items.
|
| var blocker = document.createElement('span');
|
| blocker.className = 'blocker';
|
| link.appendChild(blocker);
|
| link.appendChild(image);
|
| displayLink(link);
|
| - logEvent(NTP_LOGGING_EVENT_TYPE.NTP_TILE_LOADED);
|
| };
|
| image.onerror = function() {
|
| // If no external thumbnail fallback (etfb), and have domain.
|
| @@ -63,7 +52,6 @@ window.addEventListener('DOMContentLoaded', function() {
|
| } else {
|
| showEmptyTile();
|
| }
|
| - logEvent(NTP_LOGGING_EVENT_TYPE.NTP_TILE_LOADED);
|
| };
|
| image.src = src;
|
| }
|
| @@ -73,7 +61,6 @@ window.addEventListener('DOMContentLoaded', function() {
|
| showEmptyTile();
|
| } else if (useIcons && data.largeIconUrl) {
|
| createThumbnail(data.largeIconUrl, 'large-icon');
|
| - // TODO(huangs): Log event for large icons.
|
| } else if (!useIcons && data.thumbnailUrls && data.thumbnailUrls.length) {
|
| createThumbnail(data.thumbnailUrls[0], 'thumbnail');
|
| } else if (data.domain) {
|
| @@ -81,11 +68,5 @@ window.addEventListener('DOMContentLoaded', function() {
|
| } else {
|
| showEmptyTile();
|
| }
|
| - logEvent(NTP_LOGGING_EVENT_TYPE.NTP_TILE);
|
| -
|
| - // Log an impression if we know the position of the tile.
|
| - if (isFinite(params.pos)) {
|
| - logMostVisitedImpression(parseInt(params.pos, 10), data.tileSource);
|
| - }
|
| });
|
| });
|
|
|