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

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

Issue 2525653002: NewTabPage: Remove impression/click ping plumbing for local NTP (Closed)
Patch Set: Created 4 years, 1 month 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/common/render_messages.h » ('j') | components/suggestions/proto/suggestions.proto » ('J')
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 f08b0cec42c63fb7351c48869216e1c8d4379b95..dba04aac90b3e129ee22a9682ed60d0c1058f118 100644
--- a/chrome/browser/resources/local_ntp/most_visited_single.js
+++ b/chrome/browser/resources/local_ntp/most_visited_single.js
@@ -83,11 +83,6 @@ var tiles = null;
*/
var queryArgs = {};
-/**
- * Url to ping when suggestions have been shown.
- */
-var impressionUrl = null;
-
mastiz 2016/11/28 13:46:22 As discussed offline, I'd prefer if the javascript
Marc Treib 2016/11/28 13:56:47 Done.
/**
* Log an event on the NTP.
@@ -279,11 +274,6 @@ var showTiles = function() {
// Make sure the tiles variable contain the next tileset we may use.
tiles = document.createElement('div');
-
- if (impressionUrl) {
- navigator.sendBeacon(impressionUrl);
- impressionUrl = null;
- }
};
@@ -382,14 +372,6 @@ var renderTile = function(data) {
}
tile.setAttribute('aria-label', data.title);
tile.title = data.title;
- if (data.impressionUrl) {
- impressionUrl = data.impressionUrl;
- }
- if (data.pingUrl) {
- tile.addEventListener('click', function(ev) {
- navigator.sendBeacon(data.pingUrl);
- });
- }
tile.addEventListener('click', function(ev) {
logMostVisitedNavigation(position, data.tileSource);
« no previous file with comments | « no previous file | chrome/common/render_messages.h » ('j') | components/suggestions/proto/suggestions.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698