0
Go to file
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-10-23 21:50:38 +00:00
2024-10-22 22:06:25 +00:00
2024-10-22 22:06:25 +00:00
2024-10-22 08:20:13 +00:00
2024-10-24 06:01:22 +00:00

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.

Description
Chromium是一个开源浏览器项目,提供了一种安全、快速、稳定的方法来体验Web。该浏览器可以在多个平台上下载,包括Mac、Windows、Linux和ChromiumOS。项目原始地址: https://chromium.googlesource.com/chromium/src.git
https://www.mobibrw.com/gitea-mirrors/chromium/src.git
Readme BSD-3-Clause 89 GiB
Languages
C++ 74.4%
Java 8.2%
Objective-C++ 4.6%
TypeScript 4%
Python 2.5%
Other 6.1%