Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 2aba4bcb91a3ec52f4d25e195000466ec695f8ed..4571556355313b498fd9c645e46c94cb06dcc438 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2418,6 +2418,28 @@ void WebContentsImpl::RouteCloseEvent(RenderViewHost* rvh) { |
GetRenderViewHost()->ClosePage(); |
} |
+bool WebContentsImpl::ShouldIgnoreNavigation( |
+ RenderViewHost* render_view_host, |
+ const GURL& url, |
+ const content::Referrer& referrer, |
+ bool is_content_initiated) { |
+ if (!delegate_) |
+ return false; |
+ |
+ GURL validated_url(url); |
+ RenderViewHostImpl* render_view_host_impl = |
+ static_cast<RenderViewHostImpl*>(render_view_host); |
+ content::RenderProcessHost* render_process_host = |
+ render_view_host->GetProcess(); |
+ render_view_host_impl->FilterURL( |
+ ChildProcessSecurityPolicyImpl::GetInstance(), |
+ render_process_host->GetID(), |
+ false, |
+ &validated_url); |
+ return delegate_->ShouldIgnoreNavigation( |
+ this, validated_url, referrer, is_content_initiated); |
joth
2012/05/11 15:34:13
feels like it should be possible to write a test c
mkosiba (inactive)
2012/05/15 14:20:23
Should be possible to inject the throttle into req
|
+} |
+ |
void WebContentsImpl::RunJavaScriptMessage( |
RenderViewHost* rvh, |
const string16& message, |