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

Side by Side Diff: chrome/browser/resources/ntp4/most_visited_page.js

Issue 9254023: [NTP4] Track the position of each app that's launched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('ntp4', function() { 5 cr.define('ntp4', function() {
6 'use strict'; 6 'use strict';
7 7
8 var TilePage = ntp4.TilePage; 8 var TilePage = ntp4.TilePage;
9 9
10 /** 10 /**
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } else { 134 } else {
135 // Records an app launch from the most visited page (Chrome will decide 135 // Records an app launch from the most visited page (Chrome will decide
136 // whether the url is an app). TODO(estade): this only works for clicks; 136 // whether the url is an app). TODO(estade): this only works for clicks;
137 // other actions like "open in new tab" from the context menu won't be 137 // other actions like "open in new tab" from the context menu won't be
138 // recorded. Can this be fixed? 138 // recorded. Can this be fixed?
139 chrome.send('recordAppLaunchByURL', 139 chrome.send('recordAppLaunchByURL',
140 [encodeURIComponent(this.href), 140 [encodeURIComponent(this.href),
141 ntp4.APP_LAUNCH.NTP_MOST_VISITED]); 141 ntp4.APP_LAUNCH.NTP_MOST_VISITED]);
142 // Records the index of this tile. 142 // Records the index of this tile.
143 chrome.send('metricsHandler:recordInHistogram', 143 chrome.send('metricsHandler:recordInHistogram',
144 ['NTP_MostVisited', this.index, 8]); 144 ['NTP_MostVisited', this.index, THUMBNAIL_COUNT]);
Dan Beam 2012/01/19 08:18:14 just cleanup
145 } 145 }
146 }, 146 },
147 147
148 /** 148 /**
149 * Allow blacklisting most visited site using the keyboard. 149 * Allow blacklisting most visited site using the keyboard.
150 */ 150 */
151 handleKeyDown_: function(e) { 151 handleKeyDown_: function(e) {
152 if (!cr.isMac && e.keyCode == 46 || // Del 152 if (!cr.isMac && e.keyCode == 46 || // Del
153 cr.isMac && e.metaKey && e.keyCode == 8) { // Cmd + Backspace 153 cr.isMac && e.metaKey && e.keyCode == 8) { // Cmd + Backspace
154 this.blacklist_(); 154 this.blacklist_();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 return oldData; 419 return oldData;
420 }; 420 };
421 421
422 return { 422 return {
423 MostVisitedPage: MostVisitedPage, 423 MostVisitedPage: MostVisitedPage,
424 refreshData: refreshData, 424 refreshData: refreshData,
425 }; 425 };
426 }); 426 });
OLDNEW
« chrome/browser/resources/ntp4/apps_page.js ('K') | « chrome/browser/resources/ntp4/apps_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698