• Kinuko Yasuda's avatar
    Introduce prefetch urlloader · db67b537
    Kinuko Yasuda authored
    (Partly as a preparation to add more logic for htxg-specific prefetch
    plumbing)
    
    Introduce prefetch-specific URLLoader which does:
    - Basically just forwards the request to the underlying network loader
    - Doesn't forward back the data to the renderer process, which used to
      be just discarded in the renderer process anyways.
    
    This is hooked as follows:
    - When NetworkService is enabled LinkLoader gets PrefetchURLLoaderFactory
      via PrefetchURLLoaderService and sets it as ResourceLoaderOptions.
      url_loader_factory.
    - When NetworkService is NOT enabled this is directly hooked from the
      ResourceMessageFilter.
    
    In both cases the URLLoaderFactory is owned by StoragePartition,
    partially because it makes various plumbing (including tests) easier.
    
    Optionally we can make it live longer than the client process, though
    it is not currently implemented. (So no behavior change is expected
    with this one)
    
    Bug: 803776
    Change-Id: Ia4b33048a7c6d27a80044d99b62a1cc5faad5681
    Reviewed-on: https://chromium-review.googlesource.com/912051
    Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
    Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#537605}
    db67b537
BUILD.gn 99.7 KB