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

Unified Diff: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp

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/web/LocalFrameClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
index 7112694b7e567bc354b680fe3e56316c0e648018..13cda10e7fd42ecdd194a2e14e34fbcdbb56f42d 100644
--- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
+++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
@@ -231,6 +231,15 @@ void LocalFrameClientImpl::DidUpdateCurrentHistoryItem() {
web_frame_->Client()->DidUpdateCurrentHistoryItem();
}
+bool LocalFrameClientImpl::AllowContentInitiatedDataUrlNavigations(
+ const KURL& url) {
+ if (RuntimeEnabledFeatures::allowContentInitiatedDataUrlNavigationsEnabled())
+ return true;
+ if (web_frame_->Client())
+ return web_frame_->Client()->AllowContentInitiatedDataUrlNavigations(url);
+ return false;
+}
+
bool LocalFrameClientImpl::HasWebView() const {
return web_frame_->ViewImpl();
}
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698