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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: Fix Android PDF tests where PDFs should be downloaded Created 3 years, 8 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/renderer/render_frame_impl.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index fbf545b8694f14fe1d2685c176186ad42e87ae5d..ebdb9309f7c3770715f1adb6b5716b092958725b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4712,6 +4712,12 @@ bool RenderFrameImpl::AllowWebGL(bool default_value) {
return !blocked;
}
+bool RenderFrameImpl::AllowContentInitiatedDataUrlNavigations(
+ const blink::WebURL& url) {
+ // Error pages can navigate to data URLs.
+ return url.GetString() == kUnreachableWebDataURL;
+}
+
blink::WebScreenOrientationClient*
RenderFrameImpl::GetWebScreenOrientationClient() {
if (!screen_orientation_dispatcher_)
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698