|
|
Created:
3 years, 11 months ago by sfiera Modified:
3 years, 11 months ago Reviewers:
Bernhard Bauer CC:
chromium-reviews, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse server signal to decide whether to notify
BUG=675561
Review-Url: https://codereview.chromium.org/2618703004
Cr-Commit-Position: refs/heads/master@{#441944}
Committed: https://chromium.googlesource.com/chromium/src/+/1ed3d555ea644e4648f14fab71a67b45c30d0e15
Patch Set 1 #
Total comments: 6
Patch Set 2 : Address review comments #Patch Set 3 : rebase #
Dependent Patchsets: Messages
Total messages: 15 (8 generated)
sfiera@chromium.org changed reviewers: + bauerb@chromium.org
Now that the signal exists in ContentSuggestion. Needs a helper function from https://crrev.com/2613863003; I'll rebase after that lands. Thanks!
https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... File chrome/browser/android/ntp/content_suggestions_notifier_service.cc (right): https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... chrome/browser/android/ntp/content_suggestions_notifier_service.cc:108: if (false /* DO_NOT_SUBMIT: always_notify after crrev.com/2613863003 */) { So, if the feature is enabled, we will always notify about the first suggestion, but only for ARTICLES, never for any other category, whereas if the feature is disabled, we will notify for any category that has the notification signal. Is that intended behavior or should the conditions be jiggled around? https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... chrome/browser/android/ntp/content_suggestions_notifier_service.cc:110: suggestions.size()) { Maybe use !suggestions.empty()?
https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... File chrome/browser/android/ntp/content_suggestions_notifier_service.cc (right): https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... chrome/browser/android/ntp/content_suggestions_notifier_service.cc:108: if (false /* DO_NOT_SUBMIT: always_notify after crrev.com/2613863003 */) { On 2017/01/05 17:31:17, Bernhard Bauer wrote: > So, if the feature is enabled, we will always notify about the first suggestion, > but only for ARTICLES, never for any other category, whereas if the feature is > disabled, we will notify for any category that has the notification signal. Is > that intended behavior or should the conditions be jiggled around? This condition will use AlwaysNotifyAboutContentSuggestions(), which checks a variation parameter. There are three possibilities: the feature is disabled (in which case this service is never even created), it's enabled and we use the server's signal (by default), and the experimental behavior of this branch when always_notify=true. AlwaysNotifyAboutContentSuggestions() is a simple helper function, so I just inlined it with a TODO for now. https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... chrome/browser/android/ntp/content_suggestions_notifier_service.cc:110: suggestions.size()) { On 2017/01/05 17:31:17, Bernhard Bauer wrote: > Maybe use !suggestions.empty()? Done.
The CQ bit was checked by sfiera@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM if the behavior mentioned below is intended. https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... File chrome/browser/android/ntp/content_suggestions_notifier_service.cc (right): https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... chrome/browser/android/ntp/content_suggestions_notifier_service.cc:108: if (false /* DO_NOT_SUBMIT: always_notify after crrev.com/2613863003 */) { On 2017/01/05 19:14:37, sfiera wrote: > On 2017/01/05 17:31:17, Bernhard Bauer wrote: > > So, if the feature is enabled, we will always notify about the first > suggestion, > > but only for ARTICLES, never for any other category, whereas if the feature is > > disabled, we will notify for any category that has the notification signal. Is > > that intended behavior or should the conditions be jiggled around? > > This condition will use AlwaysNotifyAboutContentSuggestions(), which checks a > variation parameter. There are three possibilities: the feature is disabled (in > which case this service is never even created), it's enabled and we use the > server's signal (by default), and the experimental behavior of this branch when > always_notify=true. Yes, but my point was, in the third case (if the always notify experiment is one), we will always notify about articles, but never about anything else, even if it has the server's signal. Is that intended? > AlwaysNotifyAboutContentSuggestions() is a simple helper function, so I just > inlined it with a TODO for now.
https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... File chrome/browser/android/ntp/content_suggestions_notifier_service.cc (right): https://codereview.chromium.org/2618703004/diff/1/chrome/browser/android/ntp/... chrome/browser/android/ntp/content_suggestions_notifier_service.cc:108: if (false /* DO_NOT_SUBMIT: always_notify after crrev.com/2613863003 */) { On 2017/01/06 13:26:59, Bernhard Bauer wrote: > On 2017/01/05 19:14:37, sfiera wrote: > > On 2017/01/05 17:31:17, Bernhard Bauer wrote: > > > So, if the feature is enabled, we will always notify about the first > > suggestion, > > > but only for ARTICLES, never for any other category, whereas if the feature > is > > > disabled, we will notify for any category that has the notification signal. > Is > > > that intended behavior or should the conditions be jiggled around? > > > > This condition will use AlwaysNotifyAboutContentSuggestions(), which checks a > > variation parameter. There are three possibilities: the feature is disabled > (in > > which case this service is never even created), it's enabled and we use the > > server's signal (by default), and the experimental behavior of this branch > when > > always_notify=true. > > Yes, but my point was, in the third case (if the always notify experiment is > one), we will always notify about articles, but never about anything else, even > if it has the server's signal. Is that intended? Oh, I see. Yes, this is the intended behavior. The intent is to replace the server's signal entirely.
The CQ bit was checked by sfiera@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1483717202008000, "parent_rev": "4c5494ab0c4036e09b174ee9d425ba03465deb31", "commit_rev": "1ed3d555ea644e4648f14fab71a67b45c30d0e15"}
Message was sent while issue was closed.
Description was changed from ========== Use server signal to decide whether to notify BUG=675561 ========== to ========== Use server signal to decide whether to notify BUG=675561 Review-Url: https://codereview.chromium.org/2618703004 Cr-Commit-Position: refs/heads/master@{#441944} Committed: https://chromium.googlesource.com/chromium/src/+/1ed3d555ea644e4648f14fab71a6... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/1ed3d555ea644e4648f14fab71a6... |