• Marc Treib's avatar
    Immediately unsubscribe from invalidations when Recent Tabs is closed · 0af7b33b
    Marc Treib authored
    On Android, Sync only subscribes for SESSIONS invalidations while the
    Recent Tabs page is open.
    
    Before this CL, the corresponding *un*subscription was delayed by one
    hour, to avoid subscription/unsubscription churn. However, this task
    was not persisted, i.e. it got lost if Chrome was shut down within that
    hour. The new FCM-based invalidations system does not do any cleanup on
    startup (in contrast to the old Tango system), meaning such an
    unsubscription would then never actually happen.
    
    This CL removes the unregistration delay, as a quick fix to avoid most
    of the "dangling subscriptions". It also adds a feature
    "SyncUseSessionsUnregisterDelay" (disabled by default) to go back to
    the previous behavior.
    
    Bug: 1024817
    Change-Id: Iaaf1afca3ba8719a3837dd760e4bd169d4d3c3c3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919209Reviewed-by: default avatarTim Schumann <tschumann@chromium.org>
    Commit-Queue: Marc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#719621}
    0af7b33b
browser_sync_switches.h 724 Bytes