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

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h

Issue 2046523005: Introduce WebInsecureRequestPolicy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/frame/csp/ContentSecurityPolicy.h
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
index befa79ce37f8840af11fcd2ca706b592bd98babc..88554042bc0b51ab855fd08370c85dbe6974882a 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -37,6 +37,7 @@
#include "platform/network/ResourceRequest.h"
#include "platform/v8_inspector/public/ConsoleTypes.h"
#include "platform/weborigin/ReferrerPolicy.h"
+#include "public/platform/WebInsecureRequestPolicy.h"
#include "wtf/HashSet.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
@@ -253,12 +254,13 @@ public:
const KURL url() const;
void enforceSandboxFlags(SandboxFlags);
- void enforceStrictMixedContentChecking();
void treatAsPublicAddress();
String evalDisabledErrorMessage() const;
- void setInsecureRequestsPolicy(SecurityContext::InsecureRequestsPolicy);
- SecurityContext::InsecureRequestsPolicy getInsecureRequestsPolicy() const { return m_insecureRequestsPolicy; }
+ // Upgrade-Insecure-Requests and Block-All-Mixed-Content are represented in |m_insecureRequestPolicy|
+ void enforceStrictMixedContentChecking();
+ void upgradeInsecureRequests();
+ WebInsecureRequestPolicy getInsecureRequestPolicy() const { return m_insecureRequestPolicy; }
Yoav Weiss 2016/06/07 10:30:23 Can you add a comment saying that getInsecureReque
Mike West 2016/06/07 10:39:49 I think it will eventually be web-exposed once I g
bool urlMatchesSelf(const KURL&) const;
bool protocolMatchesSelf(const KURL&) const;
@@ -307,11 +309,10 @@ private:
// State flags used to configure the environment after parsing a policy.
SandboxFlags m_sandboxMask;
- bool m_enforceStrictMixedContentChecking;
ReferrerPolicy m_referrerPolicy;
bool m_treatAsPublicAddress;
String m_disableEvalErrorMessage;
- SecurityContext::InsecureRequestsPolicy m_insecureRequestsPolicy;
+ WebInsecureRequestPolicy m_insecureRequestPolicy;
Member<CSPSource> m_selfSource;
String m_selfProtocol;

Powered by Google App Engine
This is Rietveld 408576698