• Mikel Astiz's avatar
    Make vending of sync IDs (tab_node_id) more explicit · cb491c4c
    Mikel Astiz authored
    Prior to this patch, it was buried in GetTabNodeFromLocalTabId() which
    sometimes made a lookup only (if the tab ID was already associated) and
    some other times vended a new sync ID (via
    TabNodePool::AssociateWithFreeTabNode()).
    
    We refactor the APIs to surface this logic more explicitly in the only
    calling site, in LocalSessionEventHandlerImpl.
    
    As a bonus point, a related test is added to SessionSyncBridgeTest,
    which also passes prior to this patch.
    
    Bug: 843554
    Change-Id: Ie9a2b136dbfb631e43d3abf2c345c07036670eb9
    Reviewed-on: https://chromium-review.googlesource.com/1071572Reviewed-by: default avatarMarc Treib <treib@chromium.org>
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#561478}
    cb491c4c
synced_session_tracker.cc 30 KB