• Maksim Moskvitin's avatar
    [Sync:USS] Plumb sync controller for Nigori USS · ee4382ca
    Maksim Moskvitin authored
    If the experimental feature for Nigori USS is enabled, the new codepath
    now uses a controller (ModelTypeController) to start and stop Nigori,
    and to connect it to the ModelTypeWorker.
    
    Because of lifetime issues with Nigori, and the special treatment for
    the initial sync cycle during engine initialization (which predates the
    instantiation of DataTypeManager), the interactions with the controller
    are done manually, and on the sync thread. This is not ideal, but we
    don't have better alternatives as of today, without intrusive changes
    that would be barely feasible during the coexistence of both codepaths.
    
    To avoid engine_impl's dependence on driver the registration of Nigori
    datatype was moved back to SyncEngineBackend (partially revert
    https://chromium-review.googlesource.com/c/chromium/src/+/1619813).
    
    Bug: 922900
    Change-Id: I22b20d3a0e2f396a0eddbef54cf2e429f02cc410
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648178
    Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#667114}
    ee4382ca
sync_engine_backend.h 10.5 KB