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

Issue 2626643002: Stop showing notifications if they're ignored (Closed)

Created:
3 years, 11 months ago by sfiera
Modified:
3 years, 11 months ago
CC:
chromium-reviews, noyau+watch_chromium.org, asvitkine+watch_chromium.org, ntp-dev+reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop showing notifications if they’re ignored 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} Committed: https://chromium.googlesource.com/chromium/src/+/3cf8939974888a7d5425c244f8962822a642d346

Patch Set 1 #

Patch Set 2 : Merge actions histogram together #

Patch Set 3 : Properly hook up to Android #

Patch Set 4 : Spellcheck #

Patch Set 5 : rebase #

Total comments: 17

Patch Set 6 : Formatting, explicit #

Total comments: 10

Patch Set 7 : Address comments #

Total comments: 1

Patch Set 8 : Cache metrics when native library not loaded #

Patch Set 9 : String.equals() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+377 lines, -22 lines) Patch
M chrome/android/java/AndroidManifest.xml View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java View 1 2 3 4 5 6 7 8 6 chunks +106 lines, -16 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/android/ntp/content_suggestions_notification_helper.h View 1 2 3 4 5 6 7 4 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/android/ntp/content_suggestions_notification_helper.cc View 1 2 3 4 5 6 7 2 chunks +78 lines, -4 lines 0 comments Download
M chrome/browser/android/ntp/content_suggestions_notifier_service.cc View 1 2 3 4 5 6 7 7 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/ntp_snippets/ntp_snippets_features.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ntp_snippets/ntp_snippets_features.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/ntp_snippets/ntp_snippets_metrics.h View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/ntp_snippets/ntp_snippets_metrics.cc View 1 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 2 chunks +50 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 42 (27 generated)
sfiera
bauerb: most of it asvitkine: histograms changes Does the setup of Impressions and Actions make ...
3 years, 11 months ago (2017-01-11 11:13:09 UTC) #10
Bernhard Bauer
https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java (right): https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java#newcode45 chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java:45: nativeNotificationTapped(); Do you actually know that the native library ...
3 years, 11 months ago (2017-01-11 15:21:49 UTC) #13
sfiera
https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java (right): https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java#newcode45 chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java:45: nativeNotificationTapped(); On 2017/01/11 15:21:49, Bernhard Bauer wrote: > Do ...
3 years, 11 months ago (2017-01-11 15:41:52 UTC) #14
Bernhard Bauer
https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java (right): https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java#newcode45 chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java:45: nativeNotificationTapped(); On 2017/01/11 15:41:51, sfiera wrote: > On 2017/01/11 ...
3 years, 11 months ago (2017-01-11 15:58:25 UTC) #15
Alexei Svitkine (slow)
lgtm % comments https://codereview.chromium.org/2626643002/diff/100001/chrome/browser/android/ntp/content_suggestions_notification_helper.cc File chrome/browser/android/ntp/content_suggestions_notification_helper.cc (right): https://codereview.chromium.org/2626643002/diff/100001/chrome/browser/android/ntp/content_suggestions_notification_helper.cc#newcode103 chrome/browser/android/ntp/content_suggestions_notification_helper.cc:103: static void NotificationExpired(JNIEnv* env, const JavaParamRef<jclass>&) ...
3 years, 11 months ago (2017-01-11 16:45:59 UTC) #16
sfiera
https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java (right): https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java#newcode45 chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java:45: nativeNotificationTapped(); On 2017/01/11 15:58:24, Bernhard Bauer wrote: > On ...
3 years, 11 months ago (2017-01-12 11:26:23 UTC) #19
Bernhard Bauer
https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java (right): https://codereview.chromium.org/2626643002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java#newcode45 chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java:45: nativeNotificationTapped(); On 2017/01/12 11:26:23, sfiera wrote: > On 2017/01/11 ...
3 years, 11 months ago (2017-01-12 12:13:53 UTC) #20
sfiera
It's preferable to not load the native library, but how important is it? It looks ...
3 years, 11 months ago (2017-01-12 12:50:25 UTC) #21
Bernhard Bauer
On 2017/01/12 12:50:25, sfiera wrote: > It's preferable to not load the native library, but ...
3 years, 11 months ago (2017-01-12 13:42:53 UTC) #24
sfiera
Sounds good. Should I just do the flush as part of our KeyedService's initialization, or ...
3 years, 11 months ago (2017-01-12 14:06:18 UTC) #25
Bernhard Bauer
On 2017/01/12 14:06:18, sfiera wrote: > Sounds good. Should I just do the flush as ...
3 years, 11 months ago (2017-01-12 14:47:53 UTC) #26
sfiera
OK! Ready for another look.
3 years, 11 months ago (2017-01-12 18:37:02 UTC) #28
Bernhard Bauer
LGTM, thanks!
3 years, 11 months ago (2017-01-13 11:38:51 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2626643002/150001
3 years, 11 months ago (2017-01-13 12:03:02 UTC) #39
commit-bot: I haz the power
3 years, 11 months ago (2017-01-13 13:54:23 UTC) #42
Message was sent while issue was closed.
Committed patchset #9 (id:150001) as
https://chromium.googlesource.com/chromium/src/+/3cf8939974888a7d5425c244f896...

Powered by Google App Engine
This is Rietveld 408576698