[sync] Prevent sessions flare on startup

Desktop / Chromium - pnoland [chromium.org] - 20 April 2017 16:47 EDT

SyncSessionsWebContents router triggered its flare for any notification it received, no matter what. This caused it to trigger a flare more or less immediately upon startup. This change caused the flare to trigger only if the notification is meaningful; i.e. it's for a valid tab's load completed event. This is a change from the past behavior, which wouldn't flare for tabs that shouldn't sync, like the new tab page, but would flare for any event type.

R=skym@chromium.org

BUG=712372

Review-Url: https://codereview.chromium.org/2824073002 Cr-Commit-Position: refs/heads/master@{#466119}

e8227a0 [sync] Prevent sessions flare on startup
.../sync/sessions/browser_list_router_helper.cc | 2 +-
.../sessions/sync_sessions_router_tab_helper.cc | 6 +-
.../sessions/sync_sessions_router_tab_helper.h | 2 +-
.../sessions/sync_sessions_web_contents_router.cc | 17 ++--
.../sessions/sync_sessions_web_contents_router.h | 3 +-
.../sync_sessions_web_contents_router_unittest.cc | 92 ++++++++++++++++++++++
chrome/test/BUILD.gn | 1 +
components/sync/model/syncable_service.h | 17 ++--
8 files changed, 121 insertions(+), 19 deletions(-)

Upstream: git.chromium.org


  • Share