Chromium Code Reviews| 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 d6d878cf464998d72d4d6023c05db3c8cf48d47d..d098dee511499d32dca1ab0cd3c33b5998490a84 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -1012,7 +1012,8 @@ void RenderFrameHostImpl::OnFrameFocused() { |
| void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { |
| GURL validated_url(params.url); |
| - GetProcess()->FilterURL(false, &validated_url); |
| + if (validated_url != GURL(content::kAboutSrcDocURL)) |
| + GetProcess()->FilterURL(false, &validated_url); |
| if (params.is_history_navigation_in_new_child) { |
| DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); |
| @@ -1190,11 +1191,13 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
| // renderer to load the URL and grant the renderer the privileges to request |
| // the URL. To prevent this attack, we block the renderer from inserting |
| // banned URLs into the navigation controller in the first place. |
| - process->FilterURL(false, &validated_params.url); |
| + if (validated_params.url != GURL(content::kAboutSrcDocURL)) |
| + process->FilterURL(false, &validated_params.url); |
| process->FilterURL(true, &validated_params.referrer.url); |
| for (std::vector<GURL>::iterator it(validated_params.redirects.begin()); |
| it != validated_params.redirects.end(); ++it) { |
| - process->FilterURL(false, &(*it)); |
| + if (*it != GURL(content::kAboutSrcDocURL)) |
|
nasko
2016/11/10 18:14:14
All of these checks will be unnecessary if we upda
|
| + process->FilterURL(false, &(*it)); |
| } |
| process->FilterURL(true, &validated_params.searchable_form_url); |
| @@ -3195,7 +3198,7 @@ RenderFrameHostImpl::TakeNavigationHandleForCommit( |
| return NavigationHandleImpl::Create( |
| params.url, frame_tree_node_, is_renderer_initiated, |
| - params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), |
| + params.was_within_same_page, base::TimeTicks::Now(), |
| pending_nav_entry_id, false); // started_from_context_menu |
| } |
| @@ -3247,7 +3250,7 @@ RenderFrameHostImpl::TakeNavigationHandleForCommit( |
| // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| return NavigationHandleImpl::Create( |
| params.url, frame_tree_node_, is_renderer_initiated, |
| - params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), |
| + params.was_within_same_page, base::TimeTicks::Now(), |
| entry_id_for_data_nav, false); // started_from_context_menu |
| } |