New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment
link

Issue 898269: Notification metrics centralized layer

Reported by xingliu@chromium.org, Oct 23 Project Member

Issue description

Chrome Version: 72.*
OS: Android

Currently the use cases for notification is scattered and Chrome has a shim layer of API to wrap Android notification API.

To collect metrics like click through rates and provide single point entry point and deletion point, we can make most notification started/ended from a single broadcast receiver/deletion receiver. And record common metrics in this layer.
 

Comment 1 by xingliu@chromium.org, Oct 23

Summary: Notification metrics centralized layer (was: Notification metrics)

Comment 2 by xingliu@chromium.org, Nov 8

Cc: heamy@chromium.org
Status: Started (was: Untriaged)

Comment 3 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ac2feaefd888a09a18ea514529b4c5de3858823

commit 0ac2feaefd888a09a18ea514529b4c5de3858823
Author: Xing Liu <xingliu@chromium.org>
Date: Mon Nov 19 19:24:16 2018

Android Notification: Intercept PendingIntent for metrics recording.

This CL introduces a way to intercept all PendingIntents from
notification with broadcast receivers. In the following CL we will
add metrics recording into those broadcast receivers. This class will
eventually be used in ChromeNotificationBuilder.

Also we introduce a test that uses UIAutomator to actually click on
a notification in test instead of mocking Android notification API.
And verify the BroadcastReceiver interception.

Bug: 898269
Change-Id: I16e52f7036db4d30093517e16373547d5e1e862c
Reviewed-on: https://chromium-review.googlesource.com/c/1327803
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609390}
[modify] https://crrev.com/0ac2feaefd888a09a18ea514529b4c5de3858823/chrome/android/java/AndroidManifest.xml
[add] https://crrev.com/0ac2feaefd888a09a18ea514529b4c5de3858823/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java
[modify] https://crrev.com/0ac2feaefd888a09a18ea514529b4c5de3858823/chrome/android/java_sources.gni
[add] https://crrev.com/0ac2feaefd888a09a18ea514529b4c5de3858823/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptorTest.java
[modify] https://crrev.com/0ac2feaefd888a09a18ea514529b4c5de3858823/chrome/android/javatests/src/org/chromium/chrome/browser/partnercustomizations/PartnerDisableIncognitoModeIntegrationTest.java
[modify] https://crrev.com/0ac2feaefd888a09a18ea514529b4c5de3858823/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java

Comment 4 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b5f509ea5d7043572f7fa6950863f54c4fd1740

commit 1b5f509ea5d7043572f7fa6950863f54c4fd1740
Author: Xing Liu <xingliu@chromium.org>
Date: Fri Dec 14 19:29:01 2018

Android notification: Introduce ChromeNotification/PendingIntentProvider.

The Android API didn't expose notification id/tag and the int flags to
create Notification's PendingIntent, however we need to use these data
when recording Chrome notification metrics.

This CL adds wrapper class that contains these data.
ChromeNotificationBuilder will use these wrapper class in the future to
force metrics tracking and usage of NotificationManagerProxy.

Also we setup a new component for notification.

TBR=dtrainor@chromium.org, peter@chromium.org

Bug: 898269
Change-Id: I63e3976c729d71e761c8c6b5c0aead3763ba5e17
Reviewed-on: https://chromium-review.googlesource.com/c/1358650
Reviewed-by: Xing Liu <xingliu@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616783}
[add] https://crrev.com/1b5f509ea5d7043572f7fa6950863f54c4fd1740/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChromeNotification.java
[add] https://crrev.com/1b5f509ea5d7043572f7fa6950863f54c4fd1740/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationMetadata.java
[add] https://crrev.com/1b5f509ea5d7043572f7fa6950863f54c4fd1740/chrome/android/java/src/org/chromium/chrome/browser/notifications/PendingIntentProvider.java

Comment 5 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f8914c8150d9da36b057ec05358943d90456b2d8

commit f8914c8150d9da36b057ec05358943d90456b2d8
Author: Xing Liu <xingliu@chromium.org>
Date: Fri Dec 14 22:28:32 2018

Revert "Android notification: Introduce ChromeNotification/PendingIntentProvider."

This reverts commit 1b5f509ea5d7043572f7fa6950863f54c4fd1740.

Reason for revert: Didn't update build file when move code back to chrome.

Original change's description:
> Android notification: Introduce ChromeNotification/PendingIntentProvider.
> 
> The Android API didn't expose notification id/tag and the int flags to
> create Notification's PendingIntent, however we need to use these data
> when recording Chrome notification metrics.
> 
> This CL adds wrapper class that contains these data.
> ChromeNotificationBuilder will use these wrapper class in the future to
> force metrics tracking and usage of NotificationManagerProxy.
> 
> Also we setup a new component for notification.
> 
> TBR=dtrainor@chromium.org, peter@chromium.org
> 
> Bug: 898269
> Change-Id: I63e3976c729d71e761c8c6b5c0aead3763ba5e17
> Reviewed-on: https://chromium-review.googlesource.com/c/1358650
> Reviewed-by: Xing Liu <xingliu@chromium.org>
> Reviewed-by: David Trainor <dtrainor@chromium.org>
> Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
> Commit-Queue: Xing Liu <xingliu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#616783}

TBR=peter@chromium.org,nyquist@chromium.org,dtrainor@chromium.org,blundell@chromium.org,xingliu@chromium.org

Change-Id: Ic33e9232084c76c318caece0b133480f26cf43b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 898269
Reviewed-on: https://chromium-review.googlesource.com/c/1379058
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616852}
[delete] https://crrev.com/2be65e2d62ae3dbceb2b1815cf31fc3721f3cd4b/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChromeNotification.java
[delete] https://crrev.com/2be65e2d62ae3dbceb2b1815cf31fc3721f3cd4b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationMetadata.java
[delete] https://crrev.com/2be65e2d62ae3dbceb2b1815cf31fc3721f3cd4b/chrome/android/java/src/org/chromium/chrome/browser/notifications/PendingIntentProvider.java

Comment 7 by bugdroid1@chromium.org, Jan 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b8d118134dd7a005e2bbad8ea9007e14062bf16c

commit b8d118134dd7a005e2bbad8ea9007e14062bf16c
Author: Xing Liu <xingliu@chromium.org>
Date: Wed Jan 16 22:37:47 2019

Android notification: Add setContentIntent API with metric tracking.

This CL adds setContentIntent(PendingIntentProvider) in
ChromeNotificationBuilder. The old API is marked as deprecated and we
will gradually convert all notification use cases to new API.

Consumer can use this API to track notification body click events.

TBR=holte@chromium.org

Bug: 898269
Change-Id: If5aad3b4a7cf949b2d7fc4e3baf0e2b929931462
Reviewed-on: https://chromium-review.googlesource.com/c/1379223
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623412}
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChromeNotificationBuilder.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilder.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderFactory.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationMetadata.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptorTest.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationTestUtil.java
[modify] https://crrev.com/b8d118134dd7a005e2bbad8ea9007e14062bf16c/tools/metrics/histograms/histograms.xml

Comment 8 by bugdroid1@chromium.org, Jan 18

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c6f50faffdaeafac2683aee95e2d5364a86a97d

commit 3c6f50faffdaeafac2683aee95e2d5364a86a97d
Author: Xing Liu <xingliu@chromium.org>
Date: Fri Jan 18 23:31:56 2019

Tracks Android notification dismiss event.

This CL adds an API in ChromeNotificationBuilder to track notification
dismiss in UMA.

Bug: 898269
Change-Id: I0d33150eb98dfcd96c6807ab490519a39fe79101
Reviewed-on: https://chromium-review.googlesource.com/c/1387811
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624351}
[modify] https://crrev.com/3c6f50faffdaeafac2683aee95e2d5364a86a97d/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChromeNotificationBuilder.java
[modify] https://crrev.com/3c6f50faffdaeafac2683aee95e2d5364a86a97d/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilder.java
[modify] https://crrev.com/3c6f50faffdaeafac2683aee95e2d5364a86a97d/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java
[modify] https://crrev.com/3c6f50faffdaeafac2683aee95e2d5364a86a97d/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java
[modify] https://crrev.com/3c6f50faffdaeafac2683aee95e2d5364a86a97d/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java
[modify] https://crrev.com/3c6f50faffdaeafac2683aee95e2d5364a86a97d/tools/metrics/histograms/histograms.xml

Comment 9 by bugdroid, Jan 23

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9912404de9719b83cddbbc47a53f0aa5bef8cf12

commit 9912404de9719b83cddbbc47a53f0aa5bef8cf12
Author: Xing Liu <xingliu@chromium.org>
Date: Wed Jan 23 19:59:28 2019

Track Android notification action click event.

This CL adds new API to track notification action.

Bug: 898269
Change-Id: I57224020523ff3011a85679bc6d8444b3c91cc28
Reviewed-on: https://chromium-review.googlesource.com/c/1387734
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625314}

Comment 10 by bugdroid, Jan 26

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/325bed64dc68f6f582f151414c2f05a20ade4cee

commit 325bed64dc68f6f582f151414c2f05a20ade4cee
Author: Xing Liu <xingliu@chromium.org>
Date: Sat Jan 26 00:00:31 2019

Download notification: use new ChromeNotificationBuilder API for metrics.

This CL converts download notification to use new builder API which
support general notification metric recording, including:

Mobile.SystemNotification.Action.Click
Mobile.SystemNotification.Content.Click
Mobile.SystemNotification.Dismiss

TBR=dtrainor@chromium.org

Bug: 898269
Change-Id: I0a0634d9fc4bc52da2258e54dca0de7cdd3d4f09
Reviewed-on: https://chromium-review.googlesource.com/c/1433137
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626268}

Comment 11 by bugdroid, Jan 31

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e21939c7eae1baace8785a5501f2dd13fa49ee8

commit 5e21939c7eae1baace8785a5501f2dd13fa49ee8
Author: Xing Liu <xingliu@chromium.org>
Date: Thu Jan 31 18:59:46 2019

Incognito notification: use new ChromeNotificationBuilder API.

This CL converts incognito notification to use new builder API which
support general notification metric recording, including:

Mobile.SystemNotification.Action.Click
Mobile.SystemNotification.Content.Click
Mobile.SystemNotification.Dismiss

Bug: 898269
Change-Id: I2953c849ae641ea79da3c7022e3352ea24b068ae
Reviewed-on: https://chromium-review.googlesource.com/c/1437483
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628026}
[modify] https://crrev.com/5e21939c7eae1baace8785a5501f2dd13fa49ee8/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationManager.java
[modify] https://crrev.com/5e21939c7eae1baace8785a5501f2dd13fa49ee8/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationService.java
[modify] https://crrev.com/5e21939c7eae1baace8785a5501f2dd13fa49ee8/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityIncognitoTest.java
[modify] https://crrev.com/5e21939c7eae1baace8785a5501f2dd13fa49ee8/chrome/android/javatests/src/org/chromium/chrome/browser/incognito/IncognitoNotificationServiceTest.java

Comment 12 by bugdroid, Feb 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8aa7ec22df00795f590e462f58d477696bd9b5da

commit 8aa7ec22df00795f590e462f58d477696bd9b5da
Author: Xing Liu <xingliu@chromium.org>
Date: Sat Feb 09 01:26:17 2019

Android notification: Use ChromeNotification in NotificationManagerProxy.

This CL adds an API in NotificationManagerProxy to take
ChromeNotification struct when sending notification, to avoid duplicate
variable used in ChromeNotificationBuilder. Also this will enfore
NotificationManagerProxy code path.

Bug: 898269
Change-Id: I4dac598a56da3bb3b2a647445e1b47fe4ead42ce
Reviewed-on: https://chromium-review.googlesource.com/c/1437774
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630588}
[modify] https://crrev.com/8aa7ec22df00795f590e462f58d477696bd9b5da/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChromeNotificationBuilder.java
[modify] https://crrev.com/8aa7ec22df00795f590e462f58d477696bd9b5da/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilder.java
[modify] https://crrev.com/8aa7ec22df00795f590e462f58d477696bd9b5da/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java
[modify] https://crrev.com/8aa7ec22df00795f590e462f58d477696bd9b5da/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationManagerProxy.java
[modify] https://crrev.com/8aa7ec22df00795f590e462f58d477696bd9b5da/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationManagerProxyImpl.java
[modify] https://crrev.com/8aa7ec22df00795f590e462f58d477696bd9b5da/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/ChromeNotificationBuilderTest.java
[modify] https://crrev.com/8aa7ec22df00795f590e462f58d477696bd9b5da/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java

Comment 13 by bugdroid, Feb 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/720403cffeb359c80a66456db870cbd1aad66a84

commit 720403cffeb359c80a66456db870cbd1aad66a84
Author: Xing Liu <xingliu@chromium.org>
Date: Wed Feb 13 03:36:33 2019

Android notification: use new API for offlinepage download notification.

This CL converts offline page download notification to use new
ChromeNotificationBuilder API which supports general notification
metrics recording, including:

Mobile.SystemNotification.Action.Click
Mobile.SystemNotification.Content.Click
Mobile.SystemNotification.Dismiss

Bug: 898269
Change-Id: I75e199955a028bdd5bc936923c5d88bd9d217137
Reviewed-on: https://chromium-review.googlesource.com/c/1459778
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631534}
[modify] https://crrev.com/720403cffeb359c80a66456db870cbd1aad66a84/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationFactory.java
[modify] https://crrev.com/720403cffeb359c80a66456db870cbd1aad66a84/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java
[modify] https://crrev.com/720403cffeb359c80a66456db870cbd1aad66a84/tools/metrics/histograms/enums.xml

Comment 14 by bugdroid, Feb 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2b11bc8c4b89f3fafea3dcac2e47e5eaac8fc1ea

commit 2b11bc8c4b89f3fafea3dcac2e47e5eaac8fc1ea
Author: Xing Liu <xingliu@chromium.org>
Date: Sat Feb 16 04:47:17 2019

Android notification: use new API for content suggestion notification.

This CL converts content suggestion notification to use new API which
will support general notification metrics, including:

Mobile.SystemNotification.Action.Click
Mobile.SystemNotification.Content.Click
Mobile.SystemNotification.Dismiss


Bug: 898269
Change-Id: I8af3f38a558a4e2c52f28a1291edc643d3ff9e65
Reviewed-on: https://chromium-review.googlesource.com/c/1475800
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632916}
[modify] https://crrev.com/2b11bc8c4b89f3fafea3dcac2e47e5eaac8fc1ea/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java
[modify] https://crrev.com/2b11bc8c4b89f3fafea3dcac2e47e5eaac8fc1ea/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotifier.java
[modify] https://crrev.com/2b11bc8c4b89f3fafea3dcac2e47e5eaac8fc1ea/tools/metrics/histograms/enums.xml

Sign in to add a comment