Commit ee4ffbd6 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Do not call PolicyDecider callbacks for placeholder URLs.

Placeholder URLs are also used for WebErrorPages features, so this CL
ignores placeholder URLs in decidePolicy callbacks if WebErrorPages is
enabled.

Bug: 725241
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I54fb0a5e6dd692d741db4bac298f760165d276f7
Reviewed-on: https://chromium-review.googlesource.com/1087364Reviewed-by: default avatarDanyao Wang <danyao@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564652}
parent 17c4cd21
......@@ -4225,13 +4225,16 @@ registerLoadRequestForURL:(const GURL&)requestURL
// retrieved state will be pending until |didCommitNavigation| callback.
[self updatePendingNavigationInfoFromNavigationAction:action];
if (web::GetWebClient()->IsSlimNavigationManagerEnabled()) {
if (web::GetWebClient()->IsSlimNavigationManagerEnabled() ||
base::FeatureList::IsEnabled(web::features::kWebErrorPages)) {
// If this is a placeholder navigation, pass through.
if (IsPlaceholderUrl(requestURL)) {
decisionHandler(WKNavigationActionPolicyAllow);
return;
}
}
if (web::GetWebClient()->IsSlimNavigationManagerEnabled()) {
// WKBasedNavigationManager doesn't use |loadCurrentURL| for reload or back/
// forward navigation. So this is the first point where a form repost would
// be detected. Display the confirmation dialog.
......@@ -4305,7 +4308,8 @@ registerLoadRequestForURL:(const GURL&)requestURL
GURL responseURL = net::GURLWithNSURL(navigationResponse.response.URL);
// If this is a placeholder navigation, pass through.
if (web::GetWebClient()->IsSlimNavigationManagerEnabled() &&
if ((web::GetWebClient()->IsSlimNavigationManagerEnabled() ||
base::FeatureList::IsEnabled(web::features::kWebErrorPages)) &&
IsPlaceholderUrl(responseURL)) {
handler(WKNavigationResponsePolicyAllow);
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment