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

Unified Diff: chrome/browser/resources/google_now/background.js

Issue 15306005: Adding location events to the histogram (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/google_now/background.js
diff --git a/chrome/browser/resources/google_now/background.js b/chrome/browser/resources/google_now/background.js
index 0fdbd6724c10e7292d530e9fbf3dc12adacdf8ec..d2790a17c22d7a0cd1dd33c80b53effefd093102 100644
--- a/chrome/browser/resources/google_now/background.js
+++ b/chrome/browser/resources/google_now/background.js
@@ -141,7 +141,9 @@ var DiagnosticEvent = {
CARDS_PARSE_SUCCESS: 2,
DISMISS_REQUEST_TOTAL: 3,
DISMISS_REQUEST_SUCCESS: 4,
- EVENTS_TOTAL: 5 // EVENTS_TOTAL is not an event; all new events need to be
+ LOCATION_REQUEST: 5,
+ LOCATION_EVENT: 6,
rgustafson 2013/05/22 01:18:29 Why location_event? location_update?
vadimt 2013/05/22 02:02:52 Done.
+ EVENTS_TOTAL: 7 // EVENTS_TOTAL is not an event; all new events need to be
// added before it.
};
@@ -363,6 +365,7 @@ function requestNotificationCards(position, callback) {
*/
function requestLocation() {
console.log('requestLocation');
+ recordEvent(DiagnosticEvent.LOCATION_REQUEST);
// TODO(vadimt): Figure out location request options.
chrome.location.watchLocation(LOCATION_WATCH_NAME, {});
}
@@ -376,6 +379,7 @@ function requestLocation() {
function updateNotificationsCards(position) {
console.log('updateNotificationsCards ' + JSON.stringify(position) +
' @' + new Date());
+ recordEvent(DiagnosticEvent.LOCATION_EVENT);
rgustafson 2013/05/22 01:18:29 It's not clear that this should only be called fro
vadimt 2013/05/22 02:02:52 Laziness :)
tasks.add(UPDATE_CARDS_TASK_NAME, function(callback) {
console.log('updateNotificationsCards-task-begin');
updateCardsAttempts.planForNext(function() {
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698