Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/SecurityContext.cpp b/third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| index a37ff6b8230baa1b56ff5bf886d6a06243d97da4..015f65d537f54a9f45b03fc6b4b432082043e61b 100644 |
| --- a/third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| +++ b/third_party/WebKit/Source/core/dom/SecurityContext.cpp |
| @@ -32,8 +32,7 @@ |
| namespace blink { |
| SecurityContext::SecurityContext() |
| - : m_haveInitializedSecurityOrigin(false) |
| - , m_sandboxFlags(SandboxNone) |
| + : m_sandboxFlags(SandboxNone) |
| , m_hostedInReservedIPRange(false) |
| , m_insecureRequestsPolicy(InsecureRequestsDoNotUpgrade) |
| , m_enforceStrictMixedContentChecking(false) |
| @@ -52,7 +51,6 @@ DEFINE_TRACE(SecurityContext) |
| void SecurityContext::setSecurityOrigin(PassRefPtr<SecurityOrigin> securityOrigin) |
| { |
| m_securityOrigin = securityOrigin; |
| - m_haveInitializedSecurityOrigin = true; |
| } |
| void SecurityContext::setContentSecurityPolicy(PassRefPtrWillBeRawPtr<ContentSecurityPolicy> contentSecurityPolicy) |
| @@ -60,18 +58,6 @@ void SecurityContext::setContentSecurityPolicy(PassRefPtrWillBeRawPtr<ContentSec |
| m_contentSecurityPolicy = contentSecurityPolicy; |
| } |
| -bool SecurityContext::isSecureTransitionTo(const KURL& url) const |
| -{ |
| - // If we haven't initialized our security origin by now, this is probably |
| - // a new window created via the API (i.e., that lacks an origin and lacks |
| - // a place to inherit the origin from). |
| - if (!haveInitializedSecurityOrigin()) |
| - return true; |
|
dcheng
2016/02/24 21:59:02
There are at least two scenarios to consider here:
|
| - |
| - RefPtr<SecurityOrigin> other = SecurityOrigin::create(url); |
| - return securityOrigin()->canAccess(other.get()); |
| -} |
| - |
| void SecurityContext::enforceSandboxFlags(SandboxFlags mask) |
| { |
| m_sandboxFlags |= mask; |