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

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: Change page popup plumbing, remove vestigal bits related to failing security context init 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;
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;
« no previous file with comments | « third_party/WebKit/Source/core/dom/SecurityContext.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698