0
Commit Graph

4 Commits

Author SHA1 Message Date
Nate Chapin
060cb95ebc NavigationThrottle::WillCommitWithoutUrlLoader
Currently, NavigationThrottles attach only when a URLRequest will be
created, allowing throttles to participate in the network request
portion of a navigation. However, for navigations that will immedaitely
commit because no URLRequest is needed, it is impossible to throttle
the navigation. Navigations that immediately commit include
about:blank, about:srcdoc, and most* (see below) same document
navigations.

This CL introduces a new NavigationThrottle callback,
WillCommitWithoutUrlLoader. WillCommitWithoutUrlLoader is called only
in the immediate commit case (when no other NavigationThrottle
callbacks will be called), and allows the NavigationThrottle to defer
or cancel the navigation, as any other callback does.

Currently, no NavigationThrottles use WillCommitWithoutUrlLoader, but
it will be used by a new throttle that will be introduced in
https://chromium-review.googlesource.com/c/chromium/src/+/4092862.

* Some same document navigations are committed synchronously in the
renderer process, and the browser process is only told about the navigation after the fact, so we can't throttle them. Those
navigations are renderer-initiated non-back-forward same-document
navigations. WillCommitWithoutUrlLoader can intercept all
browser-initiated same-document navigations, as well as
renderer-initiated back-forward same-document navigations.

Bug: 1067613, 1371580
Change-Id: I7066e69bee5e891c9aec1b79c8c266e011f726ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4210858
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102862}
2023-02-08 21:13:07 +00:00
Yao Xiao
6e1f7d3571 [fenced frames] Support asynchronous mapping of navigation to a urn:uuid
Add a checkpoint before NavigationRequest::BeginNavigationImpl, to do
fenced frames url mapping synchronously and proceed with the navigation,
or, if the mapping decision is pending, defer the navigation until the
mapping decision is made. The mapping decision may be pending for URNs
generated as a result of sharedStorage.runURLSelectionOperation() (will
be done in a follow-up CL).

Design doc:
https://docs.google.com/document/d/1SOUQhP-0QDUJJz8G9R2VwsnCH8M1VCJWEF8O2VTY2tw

Bug: 1216088
Change-Id: I0aa5445e1fb64046a5a5ba088e3fd9ff0b64176a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3309157
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#956364}
2022-01-07 03:28:40 +00:00
danakj
d3baa13f60 Move references to content/browser/frame_host/
These (non-include) references should now point to
content/browser/renderer_host where the code has moved to.

TBR=avi@chromium.org, arthursonzogni@chromium.org

Bug: 1091083
Change-Id: I8d0ace9fab6c04e3b498eee8d442ff6bd52fd7a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2402185
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805760}
2020-09-10 15:33:56 +00:00
Fergal Daly
ffbbc2e164 Introduce a NavigationRequest::SetState for updating state_.
This centralizes all of the DCHECKs against state_ in a SetState method
to make it clear which state transitions are allowed.

This introduces some DCHECKs that were not previous present. It is
the strictest set of DHCHECKs that causes no test failures.

See also

https://docs.google.com/document/d/17G7gZh5AkcJgnrRjp_DfCWWULUB0-wb273aMBYJoKa0/edit#

Change-Id: Ic0dfdd15e7754f27784f5fc3a95d432c37be904a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215141
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#775891}
2020-06-06 15:34:39 +00:00