• Mikel Astiz's avatar
    Fix potential sync loops due to broadcasting empty updates · e0e4ea99
    Mikel Astiz authored
    We thought there was no reason to avoid broadcasting notifications when
    an empty list of remote updates is received, but it turns out that at
    least one client (iOS RecentTabsMediator) relied on the fact that such
    events would be ignored (not broadcasted via
    SyncServiceObserver::OnForeignSessionUpdated()).
    
    To avoid behavioral changes with the pre-USS implementation, which
    dropped such empty updates in an earlier stage (I believe in
    GenericChangeProcessor::CommitChangesFromSyncModel()), we adopt similar
    logic for USS (SessionSyncBridge).
    
    Bug: 854049
    Change-Id: I6d3b6123b7fb15bb0e5bfeccdc0a6d9170427fe4
    Reviewed-on: https://chromium-review.googlesource.com/1106143Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#568444}
    e0e4ea99
session_sync_bridge_unittest.cc 57.2 KB