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

Unified Diff: Source/platform/weborigin/SecurityOrigin.cpp

Issue 1082173003: Support whitelisting to handle insecure origins as trustworthy origins (blink) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: no lock (for now) Created 5 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
« no previous file with comments | « no previous file | Source/platform/weborigin/SecurityPolicy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/SecurityOrigin.cpp
diff --git a/Source/platform/weborigin/SecurityOrigin.cpp b/Source/platform/weborigin/SecurityOrigin.cpp
index 84461819af27439dafacb0db31d9d43eb6146030..d971d8bf965743227ffc4b41a6df2d6cef541c4c 100644
--- a/Source/platform/weborigin/SecurityOrigin.cpp
+++ b/Source/platform/weborigin/SecurityOrigin.cpp
@@ -381,6 +381,9 @@ bool SecurityOrigin::isPotentiallyTrustworthy(String& errorMessage) const
if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() || isLocalhost())
return true;
+ if (SecurityPolicy::isOriginWhiteListedTrustworthy(*this))
+ return true;
+
errorMessage = "Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).";
return false;
}
« no previous file with comments | « no previous file | Source/platform/weborigin/SecurityPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698