Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 2002633002: PlzNavigate: fix issue preventing navigations to WebUIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now checking when ready to commit Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 71453f0e3634b93770cfcf9e4238024437f9d62b..b5161c69b81a5a55cfdf969dc4fd1b3fec5e5ca4 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -936,9 +936,17 @@ void NavigatorImpl::FailedNavigation(FrameTreeNode* frame_tree_node,
// Select an appropriate renderer to show the error page.
RenderFrameHostImpl* render_frame_host =
frame_tree_node->render_manager()->GetFrameHostForNavigation(
- *navigation_request);
- CheckWebUIRendererDoesNotDisplayNormalURL(
+ navigation_request);
+
+ // Perform the appropriate checks for WebUIs.
+ NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(
render_frame_host, navigation_request->common_params().url);
+ if (!WebUIImpl::RenderProcessAllowedForURL(
+ render_frame_host->GetProcess(),
+ navigation_request->common_params().url)) {
+ frame_tree_node->ResetNavigationRequest(false);
+ return;
+ }
navigation_request->TransferNavigationHandleOwnership(render_frame_host);
render_frame_host->navigation_handle()->ReadyToCommitNavigation(

Powered by Google App Engine
This is Rietveld 408576698