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

Issue 1887623002: Replace the 1 in 10 grace period with an accumulating budget based on SES. (Closed)

Created:
4 years, 8 months ago by harkness
Modified:
4 years, 7 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews, Peter Beverloo, mvanouwerkerk+watch_chromium.org, johnme+watch_chromium.org, harkness+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This code replaces the existing 1 in 10 grace period with an accumulating budget based on the site engagemene score for the origin. This also allowed extensive simplification in the PushMessagingNotificationManager, since we no longer need to update the stored information when a notification is displayed. This is the second part of a many-part project to add a framework for service workers to perform background processing on behalf of the user in response to a push message but without always showing a visible notification to the user. BUG=602244 Committed: https://crrev.com/a942309be50c300eb6b18142e3feacf04d66649d Cr-Commit-Position: refs/heads/master@{#393538}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Rebase to master after Keyed Service and add a clock parameter to BackgroundBudgetService construct… #

Patch Set 3 : Integrated code review comments #

Total comments: 38

Patch Set 4 : Integrated code review comments and refactored service constructors. #

Total comments: 14

Patch Set 5 : Fixed nits #

Patch Set 6 : Missed a file in update #

Patch Set 7 : Added failure case for parsing error on prefs string. Also fixed memory leak in unit test. #

Total comments: 2

Patch Set 8 : Using Remove* instead of Set* #

Unified diffs Side-by-side diffs Delta from patch set Stats (+386 lines, -108 lines) Patch
M chrome/browser/push_messaging/background_budget_service.h View 1 2 3 4 1 chunk +25 lines, -12 lines 0 comments Download
M chrome/browser/push_messaging/background_budget_service.cc View 1 2 3 4 5 6 7 2 chunks +122 lines, -13 lines 0 comments Download
M chrome/browser/push_messaging/background_budget_service_factory.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/push_messaging/background_budget_service_unittest.cc View 1 2 3 4 5 6 2 chunks +172 lines, -9 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_browsertest.cc View 1 2 3 4 chunks +33 lines, -30 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_notification_manager.h View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_notification_manager.cc View 1 2 3 3 chunks +31 lines, -41 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
harkness
4 years, 8 months ago (2016-04-14 15:55:42 UTC) #2
Peter Beverloo
This is very exciting— our first user-visible steps towards silent push! Could you detail a ...
4 years, 8 months ago (2016-04-14 18:02:09 UTC) #4
harkness
This includes the rebase to post-KeyedService master and also adding a clock on BackgroundBudgetService and ...
4 years, 7 months ago (2016-04-27 11:21:09 UTC) #5
Peter Beverloo
Fantastic, thank you! Summarizing the impact on Push Notifications, we would grant up to five ...
4 years, 7 months ago (2016-05-04 15:41:52 UTC) #6
harkness
The number of allowed silent pushes will really depend on how engaged the user is ...
4 years, 7 months ago (2016-05-09 15:33:28 UTC) #7
Peter Beverloo
lgtm, thanks! https://codereview.chromium.org/1887623002/diff/40001/chrome/browser/push_messaging/background_budget_service_unittest.cc File chrome/browser/push_messaging/background_budget_service_unittest.cc (right): https://codereview.chromium.org/1887623002/diff/40001/chrome/browser/push_messaging/background_budget_service_unittest.cc#newcode186 chrome/browser/push_messaging/background_budget_service_unittest.cc:186: // than the starting budget. On 2016/05/09 ...
4 years, 7 months ago (2016-05-09 17:12:07 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1887623002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1887623002/100001
4 years, 7 months ago (2016-05-13 09:31:15 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/161005)
4 years, 7 months ago (2016-05-13 11:04:29 UTC) #12
harkness
https://codereview.chromium.org/1887623002/diff/60001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1887623002/diff/60001/chrome/browser/push_messaging/background_budget_service.cc#newcode29 chrome/browser/push_messaging/background_budget_service.cc:29: const double kSecondsToAccumulate = 864000.0; On 2016/05/09 17:12:06, Peter ...
4 years, 7 months ago (2016-05-13 13:58:36 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1887623002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1887623002/120001
4 years, 7 months ago (2016-05-13 14:51:35 UTC) #15
Peter Beverloo
Still lgtm % one question https://codereview.chromium.org/1887623002/diff/120001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1887623002/diff/120001/chrome/browser/push_messaging/background_budget_service.cc#newcode61 chrome/browser/push_messaging/background_budget_service.cc:61: update_map->SetStringWithoutPathExpansion(origin.spec(), ""); Why not ...
4 years, 7 months ago (2016-05-13 15:16:50 UTC) #16
harkness
https://codereview.chromium.org/1887623002/diff/120001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1887623002/diff/120001/chrome/browser/push_messaging/background_budget_service.cc#newcode61 chrome/browser/push_messaging/background_budget_service.cc:61: update_map->SetStringWithoutPathExpansion(origin.spec(), ""); On 2016/05/13 15:16:49, Peter Beverloo wrote: > ...
4 years, 7 months ago (2016-05-13 15:30:22 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1887623002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1887623002/140001
4 years, 7 months ago (2016-05-13 15:30:49 UTC) #20
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 7 months ago (2016-05-13 16:15:55 UTC) #22
commit-bot: I haz the power
4 years, 7 months ago (2016-05-13 16:17:11 UTC) #24
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/a942309be50c300eb6b18142e3feacf04d66649d
Cr-Commit-Position: refs/heads/master@{#393538}

Powered by Google App Engine
This is Rietveld 408576698