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

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

Issue 793493003: Prepare to replicate sandbox flags for OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/dom/SecurityContext.h
diff --git a/Source/core/dom/SecurityContext.h b/Source/core/dom/SecurityContext.h
index c76178da4937932319c770f577fe147894eccd51..e5c2e4ec593fa6c8c3cef357e7a522973eed0eb2 100644
--- a/Source/core/dom/SecurityContext.h
+++ b/Source/core/dom/SecurityContext.h
@@ -27,6 +27,7 @@
#ifndef SecurityContext_h
#define SecurityContext_h
+#include "core/dom/SandboxFlags.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
@@ -48,6 +49,11 @@ public:
// Note: It is dangerous to change the security origin of a script context
// that already contains content.
void setSecurityOrigin(PassRefPtr<SecurityOrigin>);
+ virtual void didUpdateSecurityOrigin() = 0;
+
+ SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
+ bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
+ void enforceSandboxFlags(SandboxFlags mask);
protected:
SecurityContext();
@@ -62,6 +68,8 @@ private:
bool m_haveInitializedSecurityOrigin;
RefPtr<SecurityOrigin> m_securityOrigin;
RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy;
+
+ SandboxFlags m_sandboxFlags;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698