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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed changes related to cancelling with the HANDLED_EXTERNALLY status code Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/resource_request_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5b750370b1e6f518206928094b39445f06ad9478..263b84ce833904fc75e9e11734270a4bc4487921 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2731,6 +2731,26 @@ void WebContentsImpl::RouteMessageEvent(
GetRenderViewHost()->GetRoutingID(), new_params));
}
+bool WebContentsImpl::ShouldIgnoreNavigation(
darin (slow to review) 2012/05/31 21:13:39 I'm trying to understand why the embedder of a Web
mkosiba (inactive) 2012/06/01 20:35:12 Done. The main reason for this code is the FilterU
+ const GURL& url,
+ const content::Referrer& referrer,
+ bool is_content_initiated) {
+ if (!delegate_)
+ return false;
+
+ GURL validated_url(url);
+ RenderViewHostImpl* render_view_host_impl = GetRenderViewHostImpl();
+ if (!render_view_host_impl)
+ return false;
+ render_view_host_impl->FilterURL(
darin (slow to review) 2012/05/31 21:13:39 nit: FilterURL is a static function so you don't n
mkosiba (inactive) 2012/06/01 20:35:12 Done.
+ ChildProcessSecurityPolicyImpl::GetInstance(),
+ render_view_host_impl->GetProcess()->GetID(),
+ false,
+ &validated_url);
+ return delegate_->ShouldIgnoreNavigation(
+ this, validated_url, referrer, is_content_initiated);
+}
+
void WebContentsImpl::RunJavaScriptMessage(
RenderViewHost* rvh,
const string16& message,
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/resource_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698