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

Unified Diff: third_party/WebKit/public/web/WebFrameClient.h

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: dcheng comments - move checks to FrameLoader 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
Index: third_party/WebKit/public/web/WebFrameClient.h
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h
index 64cb69786f7f98f45f6d774868a1d73920f8b7c5..cacb84ed88a4b3bc87aaca1d40d306da943bc62d 100644
--- a/third_party/WebKit/public/web/WebFrameClient.h
+++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -326,6 +326,12 @@ class BLINK_EXPORT WebFrameClient {
return WebHistoryItem();
}
+ // Asks the embedder whether the frame is allowed to navigate the main frame
+ // to a data URL.
kinuko 2017/04/19 07:07:44 Please add a TODO to consider converging this into
dcheng 2017/04/19 11:59:49 +1
meacer 2017/04/21 01:31:21 Done.
+ virtual bool AllowContentInitiatedDataUrlNavigations(const WebURL&) {
+ return false;
+ }
+
// Navigational notifications ------------------------------------------
// These notifications bracket any loading that occurs in the WebFrame.

Powered by Google App Engine
This is Rietveld 408576698