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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 647853002: Create a proprietary scheme for loading web-accessible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update include guards too Created 6 years, 1 month 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/common/url_constants.cc ('k') | no next file » | 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 3e422031b5d329a33646975b044e29c49c173e07..6bc51187cef0ea14d74646927f95761a0be2f166 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -984,6 +984,16 @@ void RenderThreadImpl::RegisterSchemes() {
WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme));
WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme);
WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme);
+
+ // This scheme serves resources that may be injected into the
+ // web page (e.g. by Blink). This isn't mixed content, and
+ // content security policy doesn't apply.
+ WebString resource_scheme(base::ASCIIToUTF16(kResourceScheme));
+ WebSecurityPolicy::registerURLSchemeAsSecure(resource_scheme);
+ WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(
+ resource_scheme, static_cast<WebSecurityPolicy::PolicyAreas>(
+ WebSecurityPolicy::PolicyAreaImage |
+ WebSecurityPolicy::PolicyAreaStyle));
}
void RenderThreadImpl::NotifyTimezoneChange() {
« no previous file with comments | « content/public/common/url_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698