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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1383483007: Add scheme exceptions for isSecureContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Simplify LoadExtension call Created 5 years, 2 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: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 72a3cd95e4555fec9c144a5e2873fe9c520d6a45..6346a76bfd510fc6b8bc417432eee0478806f38f 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -517,6 +517,13 @@ void ChromeContentRendererClient::RenderThreadStarted() {
WebSecurityPolicy::addOriginTrustworthyWhiteList(
WebSecurityOrigin::create(origin));
}
+
+ std::set<std::string> schemes;
+ GetSchemesBypassingSecureContextCheckWhitelist(&schemes);
+ for (const std::string& scheme : schemes) {
+ WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist(
+ WebString::fromUTF8(scheme));
+ }
}
void ChromeContentRendererClient::RenderFrameCreated(

Powered by Google App Engine
This is Rietveld 408576698