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

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

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/Source/web/LocalFrameClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
index dae4eb51a73c00cc43ede696a2bc357ec13dabab..aff46219e83756166a184b53548f0d81c1cc3e2c 100644
--- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
+++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
@@ -230,6 +230,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();
}

Powered by Google App Engine
This is Rietveld 408576698