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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrameClient.h

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
Index: third_party/WebKit/Source/core/frame/LocalFrameClient.h
diff --git a/third_party/WebKit/Source/core/frame/LocalFrameClient.h b/third_party/WebKit/Source/core/frame/LocalFrameClient.h
index 44bae22413f880abf334fe76715490ed01f71c53..3d24e8b36903044ada6aac08189cee07007dfb79 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrameClient.h
+++ b/third_party/WebKit/Source/core/frame/LocalFrameClient.h
@@ -236,6 +236,12 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidChangeScrollOffset() {}
virtual void DidUpdateCurrentHistoryItem() {}
+ // Called when a content-initiated, main frame navigation to a data URL is
+ // about to occur.
+ virtual bool AllowContentInitiatedDataUrlNavigations(const KURL&) {
+ return false;
+ }
+
virtual WebCookieJar* CookieJar() const = 0;
virtual void DidChangeName(const String&) {}

Powered by Google App Engine
This is Rietveld 408576698