• Mugdha Lakhani's avatar
    [BackgroundSync] Add BackgroundSyncScheduler · 794a2f14
    Mugdha Lakhani authored
    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: default avatarJohn Abd-El-Malek <jam@chromium.org>
    Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#702300}
    794a2f14
background_sync_proxy.h 1.91 KB