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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1917073002: Block webpages from navigating to view-source URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete layout tests Created 4 years, 7 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
« no previous file with comments | « content/public/test/content_browser_test_utils.cc ('k') | content/test/data/simple_links.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 5c52e56a48c47a5fecf9d8ab638bf6b8c6c5cb7d..6358a048deb9ee4dd7b2a4c3d56fa8d20a069b13 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1266,6 +1266,10 @@ void RenderThreadImpl::RegisterSchemes() {
// chrome-devtools:
WebString devtools_scheme(base::ASCIIToUTF16(kChromeDevToolsScheme));
WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(devtools_scheme);
+
+ // view-source:
+ WebString view_source_scheme(base::ASCIIToUTF16(kViewSourceScheme));
+ WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(view_source_scheme);
}
void RenderThreadImpl::NotifyTimezoneChange() {
« no previous file with comments | « content/public/test/content_browser_test_utils.cc ('k') | content/test/data/simple_links.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698