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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2694903007: Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Created 3 years, 10 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: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 74e0b202c6f005ffc79bb32c909b01bb847c83f2..3ba4402a309983931c0075a25572992012e9d069 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -154,6 +154,14 @@ NavigationHandleImpl::~NavigationHandleImpl() {
base::Bind(&NotifyAbandonedTransferNavigation, GetGlobalRequestID()));
}
+ if (url_.SchemeIs(url::kDataScheme) && IsInMainFrame() &&
Charlie Reis 2017/02/15 23:36:43 Why is this done from the NavigationHandleImpl des
meacer 2017/02/16 01:58:42 Done, moved to DidCommitNavigation.
+ IsRendererInitiated()) {
+ GetRenderFrameHost()->AddMessageToConsole(
+ CONSOLE_MESSAGE_LEVEL_WARNING,
+ "Upcoming versions will block content-initiated top frame navigations "
+ "to data: URLs. For more information, see https://crbug.com/594215.");
Charlie Reis 2017/02/15 23:36:43 This bug link doesn't seem like great documentatio
meacer 2017/02/16 01:58:42 Do you think blink intent to deprecate thread woul
Charlie Reis 2017/02/16 17:59:50 Yes, a link to that intent would be perfect. Than
+ }
+
if (!IsRendererDebugURL(url_))
GetDelegate()->DidFinishNavigation(this);

Powered by Google App Engine
This is Rietveld 408576698