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

Unified Diff: third_party/WebKit/Source/core/dom/SecurityContext.cpp

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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: 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;
-
- RefPtr<SecurityOrigin> other = SecurityOrigin::create(url);
- return securityOrigin()->canAccess(other.get());
-}
-
void SecurityContext::enforceSandboxFlags(SandboxFlags mask)
{
m_sandboxFlags |= mask;

Powered by Google App Engine
This is Rietveld 408576698