Make vending of sync IDs (tab_node_id) more explicit
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:Marc Treib <treib@chromium.org> Commit-Queue: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#561478}
Showing
Please register or sign in to comment