• Lukasz Anforowicz's avatar
    Remove |target_frame| param from GetOriginForURLLoaderFactoryUnchecked. · 7212a466
    Lukasz Anforowicz authored
    GetOriginForURLLoaderFactoryUnchecked can calculate the origin of the
    parent frame from the |navigation_request| parameter - there is no need
    to separately pass the |target_frame| parameter.
    
    Additionally, before this CL, the caller would calculate |target_frame|
    by calling GetRenderFrameHost() which only works at
    WILL_PROCESS_RESPONSE or later time.  Depending on
    |frame_tree_node()->parent()| means that
    GetOriginForURLLoaderFactoryUnchecked may be called earlier - this will
    hopefully help in the future call GetOriginForURLLoaderFactory when
    creating a speculative/provisional frame (in this scenario the
    |target_frame| does not exist yet).
    
    Bug: 1098938
    Change-Id: I51f1d00dd2b85cb9f50aec5e07e88428655bfff5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288810
    Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
    Reviewed-by: default avatarAaron Colwell <acolwell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#786540}
    7212a466
navigation_request.cc 204 KB