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

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

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check in History.cpp Created 5 years, 11 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 | « Source/core/dom/SecurityContext.h ('k') | Source/core/frame/Frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/SecurityContext.cpp
diff --git a/Source/core/dom/SecurityContext.cpp b/Source/core/dom/SecurityContext.cpp
index 68a4d5992527ea9812bbc2e0afda2baa78fd1a44..bdb1e20ceef8ce0540f2b2250d2649b6c1e07b52 100644
--- a/Source/core/dom/SecurityContext.cpp
+++ b/Source/core/dom/SecurityContext.cpp
@@ -34,6 +34,7 @@ namespace blink {
SecurityContext::SecurityContext()
: m_haveInitializedSecurityOrigin(false)
+ , m_sandboxFlags(SandboxNone)
{
}
@@ -64,4 +65,14 @@ bool SecurityContext::isSecureTransitionTo(const KURL& url) const
return securityOrigin()->canAccess(other.get());
}
+void SecurityContext::enforceSandboxFlags(SandboxFlags mask)
+{
+ m_sandboxFlags |= mask;
+
+ if (isSandboxed(SandboxOrigin) && securityOrigin() && !securityOrigin()->isUnique()) {
+ setSecurityOrigin(SecurityOrigin::createUnique());
+ didUpdateSecurityOrigin();
+ }
+}
+
}
« no previous file with comments | « Source/core/dom/SecurityContext.h ('k') | Source/core/frame/Frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698