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

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

Issue 2469163002: Clean up source_site_instance usage in Navigator::RequestOpenURL. (Closed)
Patch Set: Charlie's comments Created 4 years, 1 month 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/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index d9327b01b394d38379f1426313c482be02f553c7..19d576e522a785b5fcfd87a5a12fb30b2fd37900 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -994,17 +994,27 @@ void RenderFrameHostImpl::OnFrameFocused() {
}
void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) {
+ GURL validated_url(params.url);
+ GetProcess()->FilterURL(false, &validated_url);
+
if (params.is_history_navigation_in_new_child) {
DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
// Try to find a FrameNavigationEntry that matches this frame instead, based
// on the frame's unique name. If this can't be found, fall back to the
- // default params using OpenURL below.
- if (frame_tree_node_->navigator()->NavigateNewChildFrame(this, params.url))
+ // default params using RequestOpenURL below.
+ if (frame_tree_node_->navigator()->NavigateNewChildFrame(this,
+ validated_url))
return;
}
- OpenURL(params, GetSiteInstance());
+ TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url",
+ validated_url.possibly_invalid_spec());
+
+ frame_tree_node_->navigator()->RequestOpenURL(
+ this, validated_url, params.uses_post, params.resource_request_body,
+ params.extra_headers, params.referrer, params.disposition,
+ params.should_replace_current_entry, params.user_gesture);
}
void RenderFrameHostImpl::OnCancelInitialHistoryLoad() {
@@ -2353,20 +2363,6 @@ void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) {
}
}
-void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params,
- SiteInstance* source_site_instance) {
- GURL validated_url(params.url);
- GetProcess()->FilterURL(false, &validated_url);
-
- TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url",
- validated_url.possibly_invalid_spec());
- frame_tree_node_->navigator()->RequestOpenURL(
- this, validated_url, params.uses_post, params.resource_request_body,
- params.extra_headers, source_site_instance, params.referrer,
- params.disposition, params.should_replace_current_entry,
- params.user_gesture);
-}
-
void RenderFrameHostImpl::Stop() {
Send(new FrameMsg_Stop(routing_id_));
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698