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

Side by Side 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: Getting the StoragePartition from NavigationRequest 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 929
930 // If the request was canceled by the user do not show an error page. 930 // If the request was canceled by the user do not show an error page.
931 if (error_code == net::ERR_ABORTED) { 931 if (error_code == net::ERR_ABORTED) {
932 frame_tree_node->ResetNavigationRequest(false); 932 frame_tree_node->ResetNavigationRequest(false);
933 return; 933 return;
934 } 934 }
935 935
936 // Select an appropriate renderer to show the error page. 936 // Select an appropriate renderer to show the error page.
937 RenderFrameHostImpl* render_frame_host = 937 RenderFrameHostImpl* render_frame_host =
938 frame_tree_node->render_manager()->GetFrameHostForNavigation( 938 frame_tree_node->render_manager()->GetFrameHostForNavigation(
939 *navigation_request); 939 navigation_request);
940 CheckWebUIRendererDoesNotDisplayNormalURL( 940 CheckWebUIRendererDoesNotDisplayNormalURL(
941 render_frame_host, navigation_request->common_params().url); 941 render_frame_host, navigation_request->common_params().url);
942 942
943 navigation_request->TransferNavigationHandleOwnership(render_frame_host); 943 navigation_request->TransferNavigationHandleOwnership(render_frame_host);
944 render_frame_host->navigation_handle()->ReadyToCommitNavigation( 944 render_frame_host->navigation_handle()->ReadyToCommitNavigation(
945 render_frame_host); 945 render_frame_host);
946 render_frame_host->FailedNavigation(navigation_request->common_params(), 946 render_frame_host->FailedNavigation(navigation_request->common_params(),
947 navigation_request->request_params(), 947 navigation_request->request_params(),
948 has_stale_copy_in_cache, error_code); 948 has_stale_copy_in_cache, error_code);
949 } 949 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 if (pending_entry != controller_->GetVisibleEntry() || 1164 if (pending_entry != controller_->GetVisibleEntry() ||
1165 !should_preserve_entry) { 1165 !should_preserve_entry) {
1166 controller_->DiscardPendingEntry(true); 1166 controller_->DiscardPendingEntry(true);
1167 1167
1168 // Also force the UI to refresh. 1168 // Also force the UI to refresh.
1169 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1169 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1170 } 1170 }
1171 } 1171 }
1172 1172
1173 } // namespace content 1173 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698