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

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

Issue 901903003: CSP: Adding the 'upgrade-insecure-requests' directive. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WebSockets + Tests. Created 5 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
« no previous file with comments | « Source/core/dom/DocumentInit.cpp ('k') | Source/core/dom/SecurityContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/SecurityContext.h
diff --git a/Source/core/dom/SecurityContext.h b/Source/core/dom/SecurityContext.h
index 41d8f3fe1651e1674d2361b0ebacd2857c96df77..f1839ba6a325c01ba9da41839794a2d1ef76ec93 100644
--- a/Source/core/dom/SecurityContext.h
+++ b/Source/core/dom/SecurityContext.h
@@ -40,6 +40,13 @@ class KURL;
class SecurityContext {
public:
+ // The ordering here is important: 'Upgrade' overrides 'Monitor', which overrides 'DoNotUpgrade'.
+ enum InsecureContentPolicy {
+ InsecureContentDoNotUpgrade = 0,
+ InsecureContentMonitor,
+ InsecureContentUpgrade
+ };
+
SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
ContentSecurityPolicy* contentSecurityPolicy() const { return m_contentSecurityPolicy.get(); }
@@ -58,6 +65,9 @@ public:
void setHostedInReservedIPRange() { m_hostedInReservedIPRange = true; }
bool isHostedInReservedIPRange() const { return m_hostedInReservedIPRange; }
+ void setInsecureContentPolicy(InsecureContentPolicy policy) { m_insecureContentPolicy = policy; }
+ InsecureContentPolicy insecureContentPolicy() const { return m_insecureContentPolicy; }
+
protected:
SecurityContext();
virtual ~SecurityContext();
@@ -75,6 +85,7 @@ private:
SandboxFlags m_sandboxFlags;
bool m_hostedInReservedIPRange;
+ InsecureContentPolicy m_insecureContentPolicy;
};
} // namespace blink
« no previous file with comments | « Source/core/dom/DocumentInit.cpp ('k') | Source/core/dom/SecurityContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698