[BackgroundSync] Add BackgroundSyncScheduler
The logic to decide delay for each Background Sync registration is now completely in the chrome:// layer. The logic to calculate the soonest_delay across registrations across storage partitions for the browser context can be moved to content:// in a new class called BackgroundSyncScheduler. This reduces an unnecessary interaction between chrome:// and content:// layer, allows more code to be shared with embedders of content:// and this logic can be completely tested by browser tests on ContentShell. This simplifies scheduling logic, and also improves testability. Bug: 996166 Change-Id: I0aa15b9bcc35c0f2642c89d1d776668054992647 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1806576 Commit-Queue: Mugdha Lakhani <nator@chromium.org> Reviewed-by:John Abd-El-Malek <jam@chromium.org> Reviewed-by:
Rayan Kanso <rayankans@chromium.org> Cr-Commit-Position: refs/heads/master@{#702300}
Showing
This diff is collapsed.
Please register or sign in to comment