Index: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
index 4d75bab3529a61a2a191458c4ae88b59fa55fdeb..72295e0e04ed30e5abfd75fac167771b574dc569 100644 |
--- a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp |
@@ -356,6 +356,15 @@ bool SecurityOrigin::canDisplay(const KURL& url) const |
bool SecurityOrigin::isPotentiallyTrustworthy(String& errorMessage) const |
{ |
+ if (isPotentiallyTrustworthy()) |
+ return true; |
+ |
+ errorMessage = "Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)."; |
+ return false; |
+} |
+ |
+bool SecurityOrigin::isPotentiallyTrustworthy() const |
+{ |
ASSERT(m_protocol != "data"); |
if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() || isLocalhost()) |
return true; |
@@ -363,7 +372,6 @@ bool SecurityOrigin::isPotentiallyTrustworthy(String& errorMessage) const |
if (SecurityPolicy::isOriginWhiteListedTrustworthy(*this)) |
return true; |
- errorMessage = "Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)."; |
return false; |
} |