network::ResourceRequest contains:
- site_for_cookies
- top_frame_origin (being introduced in https://crrev.com/c/1335869)
Rather than getting these values from the renderer, the network service should get them from the trustworthy browser process. For example - we may be able to introduce a URLLoaderFactoryParams::first_party_url field and fill it out in RFHI::CommitNavigation (based on the last committed URL of the main frame for subframe navigations OR based on the URL being navigated to for main frame navigations).
Note that this is similiar, but quite distinct from the |request_initiator_origin_lock| being proposed in issue 871827. |request_initiator_origin_lock| tracks the origin of the frame initiating requests, but |first_party_url| would track the URL of the *main* frame.
Comment 1 by mmenke@chromium.org
, Dec 3