0
Files
src/content/browser
Taiyo Mizuhashi 9dfeb633bc Extend PrefetchContainer::referring_origin_ for general browser-initiated prefetch
This CL is based on wbjacksonjr@'s proposal.

Currently, all prefetch triggers have a concept of referring
document/origin. Specifically, potential value of PrefetchContainer::referring_origin_ is
- If CCT (prefetch from App A that has verified associated origin):
  referring_origin == A’s origin
- If CCT (otherwise): referring_origin == opaque origin [1]
  so that we can treat this request as a cross-site prefetch. Also, if
  nullopt is passed to PrefetchContainer's public ctor for browser-
  initiated prefetch, it is automatically converted to opaque origin [2]
- If Speculation rules prefetch in document A: referring_origin == A’s
  origin

In order to introduce WebView prefetch, which has no concepts that
corresponds to referring document/origin and thus has no restriction
related to it, this CL changes the type of
PrefetchContainer::referring_origin_ to std::optional so that general
browser-initiated prefetch can use this.
Practically this case can be handled like same-site prefetch, in the
same manner as normal browser-initiated prerender behaves like
same-site prerender.

[1] https://source.chromium.org/chromium/chromium/src/+/main:chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java;l=663;drc=8f3124aee72eb5cc75bec53fd9e7999592767e9a
[2] https://source.chromium.org/chromium/chromium/src/+/main:content/browser/preloading/prefetch/prefetch_container.cc;l=426;drc=4d3dad034f8aefd3a1c6043eecbd901568546936

Bug: 40946257, 363946909
Co-authored-by: Wayne Jackson Jr. <wbjacksonjr@chromium.org>
Change-Id: Ic0d1bf1e3350c719020a6a9b8232a50acc170ab4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5942243
Reviewed-by: Wayne Jackson Jr. <wbjacksonjr@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1373194}
2024-10-24 08:44:20 +00:00
..
2024-08-06 02:43:45 +00:00
2024-10-10 22:32:27 +00:00
2024-07-15 19:40:30 +00:00
2024-07-06 14:14:10 +00:00
2024-07-06 14:14:10 +00:00

This directory contains the core code needed for the browser process of a multi-process sandboxed browser.