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

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

Issue 7550015: ntp4: record app launch source (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload for real Created 9 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/most_visited_page.js
diff --git a/chrome/browser/resources/ntp4/most_visited_page.js b/chrome/browser/resources/ntp4/most_visited_page.js
index a6631c8f75bd0fd4874d463dfa1e4d9596b7e9c1..6d92f3e714efd69fc7579029d38624f477744bfa 100644
--- a/chrome/browser/resources/ntp4/most_visited_page.js
+++ b/chrome/browser/resources/ntp4/most_visited_page.js
@@ -118,6 +118,12 @@ cr.define('ntp4', function() {
this.blacklist_();
e.preventDefault();
} else {
+ // Records an app launch from the most visited page (Chrome will decide
+ // whether the url is an app).
+ chrome.send('recordAppLaunchByURL',
+ [encodeURIComponent(this.href),
+ ntp4.APP_LAUNCH.NTP_MOST_VISITED]);
+ // Records the index of this tile.
chrome.send('recordInHistogram', ['NTP_MostVisited', this.index, 8]);
}
},

Powered by Google App Engine
This is Rietveld 408576698