• Lukasz Anforowicz's avatar
    Enable CORB and request_initiator_site_lock for SharedWorkers. · c7932a54
    Lukasz Anforowicz authored
    This CL changes how SharedWorkers create their URLLoaderFactory:
    
    1. Ad-hoc creation code is replaced with a call into
       RenderProcessHost::CreateURLLoaderFactory, which
       1.1. Sets |request_initiator_site_lock| to the right origin,
       1.2. Sets |is_corb_enabled| to true.
    
    2. Code is integrated with URLLoaderInterceptor (at least if the
       NetworkService is enabled) which helps test the changes wrt
       their impact on CORB behavior.
    
    This CL also tweaks RequestInterceptor used by various CORB tests, so
    that it forwards the actual headers / body / error-code of the response
    (previously the renderer was always told that the response errored out
    with ERR_NOT_IMPLEMENTED code).
    
    Bug: 927849
    Change-Id: Ic4c673d2f9c74fd89b8482552b7b72346f783c44
    Reviewed-on: https://chromium-review.googlesource.com/c/1450430
    Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
    Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
    Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#630058}
    c7932a54
url_loader_interceptor.cc 24.7 KB