• Jan Krcal's avatar
    [User events sync] Switch to forwarding controller delegate · e01f693d
    Jan Krcal authored
    For communication between the controller of a sync data type (running
    always on the UI sequence) and the actual sync processor (running
    potentially on backend sequences) we use proxy delegates that take care
    of posting tasks across sequences. This is not needed for data types
    that run on the UI sequence.
    
    This CL makes use of the already existing
    ForwardingModelTypeControllerDelegate for the USER_EVENTS sync data
    type.
    
    This has many caveats because the delegate gets fetched immediately
    in some browser unit-tests and thus:
     - The FakeUserEventService has to provide a fake bridge and a fake
    processor (that provides a null delegate). This in turn revealed a
    previous BUILD.gn hack so the fake user event service needs to move
    into a separate test_support build target.
     - on ios, the SessionSyncService has to provide a non-null
    GlobalIdMapper to make the UserEventService constructor happy.
    
    Bug: 867801
    Change-Id: I47845732e9076e21544fba296323088750fff411
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1349690
    Commit-Queue: Jan Krcal <jkrcal@chromium.org>
    Commit-Queue: Gauthier Ambard <gambard@chromium.org>
    Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Auto-Submit: Jan Krcal <jkrcal@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#649812}
    e01f693d
fake_user_event_service.cc 1.03 KB