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

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

Issue 2411693003: Move blocking of top-level navigations to nested URLs with extension origins from non-extension pro… (Closed)
Patch Set: Created 4 years, 2 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/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index ba3a117e4417e3e3a67248fc1d29f30a8d6210f5..980b2e5029581c81e04d8b8b05f5c11be052c3d9 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -298,8 +298,11 @@ void NavigationRequest::BeginNavigation() {
void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) {
// TODO(nasko): Update the NavigationHandle creation to ensure that the
// proper values are specified for is_synchronous and is_srcdoc.
+ RenderFrameHostImpl* render_frame_host =
+ frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this);
nasko 2016/10/12 17:00:35 This is not going to give you the correct RFH. It
alexmos 2016/10/12 17:18:16 To double-check what happens (since I was confused
jam 2016/10/12 22:10:45 thanks, I added a test based on your description a
alexmos 2016/10/12 23:13:28 Thanks, the test looks nice and makes it very clea
navigation_handle_ = NavigationHandleImpl::Create(
- common_params_.url, frame_tree_node_, !browser_initiated_,
+ common_params_.url, render_frame_host->GetSiteInstance()->GetSiteURL(),
+ frame_tree_node_, !browser_initiated_,
false, // is_synchronous
false, // is_srcdoc
common_params_.navigation_start, pending_nav_entry_id,

Powered by Google App Engine
This is Rietveld 408576698