Chromium Code Reviews| 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 32830a4bbbd4d3d89eafadb629a67892f41e1646..61f818c0e276352dee0c3302b9f4151e454552ef 100644 |
| --- a/chrome/browser/resources/google_now/background.js |
| +++ b/chrome/browser/resources/google_now/background.js |
| @@ -438,6 +438,8 @@ function onNotificationClosed(notificationId, byUser) { |
| if (!byUser) |
| return; |
| + chrome.metricsPrivate.recordUserAction('GoogleNow.Dismissed'); |
| + |
|
rgustafson
2013/03/29 20:20:00
unnecessary new line
vadimt
2013/03/29 20:22:44
Yeah, I thought about this too. Given that it goes
|
| tasks.add(DISMISS_CARD_TASK_NAME, function(callback) { |
| // Schedule retrying dismissing until all dismissals go through. |
| // TODO(vadimt): Implement exponential backoff and unify it with getting |
| @@ -516,6 +518,7 @@ chrome.alarms.onAlarm.addListener(function(alarm) { |
| chrome.notifications.onClicked.addListener( |
| function(notificationId) { |
| + chrome.metricsPrivate.recordUserAction('GoogleNow.MessageClicked'); |
| onNotificationClicked(notificationId, function(actionUrls) { |
| return actionUrls.messageUrl; |
| }); |
| @@ -523,6 +526,8 @@ chrome.notifications.onClicked.addListener( |
| chrome.notifications.onButtonClicked.addListener( |
| function(notificationId, buttonIndex) { |
| + chrome.metricsPrivate.recordUserAction( |
| + 'GoogleNow.ButtonClicked' + buttonIndex); |
| onNotificationClicked(notificationId, function(actionUrls) { |
| if (!Array.isArray(actionUrls.buttonUrls)) |
| return undefined; |