-
sfiera authored
Record metrics for interactions with notifications. Stop exposing openUrl() to native code, but keep it around; we use our own intent for notification taps to track metrics now. There are at three problems exposed by the metrics in their current state: * At (first?) startup, we get multiple consecutive fetches for some reason. This results in two impressions, although the notifications have the same data, and Android only shows one. (In practice, users aren’t likely to frantically tap away on startup, the way I do, so these notifications would be suppressed by the frontmost-checking, which I’m trying to avoid) * None of the “HIDE” actions are conditional on the notification still being visible, so we record a HIDE_DEADLINE for each notification, even if the user tapped or swiped it away, and we record HIDE_FRONTMOST every time Chrome becomes frontmost, even if there’s no notification. Broadly speaking, we want the “Actions” histogram to match the units of the “Impressions” histogram, so that we can infer the fraction of displayed notifications that received each action. To do that, we should keep a list of which notifications we believe are being shown in prefs (to support Android L, which doesn’t have the getActiveNotifications() API) …in the next CL. BUG=675561 Review-Url: https://codereview.chromium.org/2626643002 Cr-Commit-Position: refs/heads/master@{#443550}
3cf89399