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

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

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: nasko comments 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 9aac7c698a8a42d49df7764dc46fe142a118bd15..a6c7b3cd0bef50e0b0e9e70e057f2e5e83041ec0 100644
--- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
+++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
@@ -224,6 +224,15 @@ void LocalFrameClientImpl::didUpdateCurrentHistoryItem() {
m_webFrame->client()->didUpdateCurrentHistoryItem();
}
+bool LocalFrameClientImpl::allowContentInitiatedDataUrlNavigations(
+ const KURL& url) {
+ if (RuntimeEnabledFeatures::allowContentInitiatedDataUrlNavigationsEnabled())
+ return true;
+ if (m_webFrame->client())
+ return m_webFrame->client()->allowContentInitiatedDataUrlNavigations(url);
+ return false;
+}
+
bool LocalFrameClientImpl::hasWebView() const {
return m_webFrame->viewImpl();
}

Powered by Google App Engine
This is Rietveld 408576698