• Makoto Shimazu's avatar
    NetS13nSW: Initialize URLLoaderFactoryGetter properly · 4c6e1a05
    Makoto Shimazu authored
    Previously, URLLoaderFactoryGetter expects that the NetworkContext is ready when
    it's initialized (URLLoaderFactoryGetter::Initialize()). However, when
    ServiceWorkerServicification is on without NetworkService, the initialization
    fails because URLRequestContext which is necessary to create a dummy
    NetworkContext is not set at that point.
    This CL splits the initialization process into two parts: creating valid
    InterfacePtrs (URLLoaderFactoryGetter::Initialize()) and passing the
    InterfaceRequests to the appropriate places
    (URLLoaderFactoryGetter::EstablishConnection()).  NetworkContext is used only
    for the latter, so EstablishConnection() is called after URLRequestContext is
    set if ServiceWorkerServicification is on without NetworkService.
    
    Bug: 829251
    Change-Id: I5fbbaa2d48232965681fc96d802711369cd96528
    Reviewed-on: https://chromium-review.googlesource.com/1025490Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
    Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#553405}
    4c6e1a05
url_loader_factory_getter.h 5.75 KB