• Antonio Gomes's avatar
    Migrate components/sync/engine/net/http_bridge.cc to network::SimpleURLLoader · bf4f299d
    Antonio Gomes authored
    URLFetcher will stop working with advent of Network Service, and
    SimpleURLLoader is the replacement API for most clients.
    This CL migrates HttpBridge and FinancialPing away from URLFetcher.
    
    Note that this CL slightly changes the flow of the HttpBridge{Factory} code.
    Previously, an URLRequestContextGetter instance was acquired on UI thread,
    passed to the Sync and IO threads.
    However, URLLoaderFactory and SimpleURLLoader have stricter threading
    restrictions than URLFetcher and URLRequestContextGetter. For instance, a
    SharedURLLoaderFactory instance needs to be created, used and deleted on
    the same thread.
    
    For this reason methods like HttpBridgeFactory::OnSignalReceived
    can not simply null out |url_loader_factory_| which is created on the "sync"
    thread.
    
    Additionally, some preexisting tests do not seem relevant for the context
    of network service, and got removed, eg TestUsesSameHttpNetworkSession,
    RequestContextGetterReleaseOrder and EarlyAbortFactory.
    Particularly, the last two used to deal with URLRequestContextGetter
    destruction. With the URLLoader migration, HttpBridge now holds on
    to mojo pipes  instead of URLRequestContextGetter.
    
    BUG=773295,844968
    
    Change-Id: I185f814ba171dca69fec55b913b86a0cc9993ef1
    Reviewed-on: https://chromium-review.googlesource.com/1174655
    Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
    Reviewed-by: default avatarNicolas Zea <zea@chromium.org>
    Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
    Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#586115}
    bf4f299d
DEPS 287 Bytes