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

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

Issue 2340983004: Remove unnecessary boolean from CSPDirectiveList (Closed)
Patch Set: Updating the denyIfgPolicy Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
index 7720a507bc2e12b5548cc6b20d36cc9b2ec9f9c3..b18ade1267e8eeccc1088921e1b9f76182cbe2a8 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
@@ -74,10 +74,10 @@ public:
ReflectedXSSDisposition getReflectedXSSDisposition() const { return m_reflectedXSSDisposition; }
ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; }
bool didSetReferrerPolicy() const { return m_didSetReferrerPolicy; }
- bool isReportOnly() const { return m_reportOnly; }
+ bool isReportOnly() const { return m_headerType == ContentSecurityPolicyHeaderTypeReport; }
const Vector<String>& reportEndpoints() const { return m_reportEndpoints; }
uint8_t requireSRIForTokens() const { return m_requireSRIFor; }
- bool isFrameAncestorsEnforced() const { return m_frameAncestors.get() && !m_reportOnly; }
+ bool isFrameAncestorsEnforced() const { return m_frameAncestors.get() && !isReportOnly(); }
// Used to copy plugin-types into a plugin document in a nested
// browsing context.
@@ -142,7 +142,7 @@ private:
bool checkAncestorsAndReportViolation(SourceListDirective*, LocalFrame*, const KURL&) const;
bool checkRequestWithoutIntegrityAndReportViolation(WebURLRequest::RequestContext, const KURL&, ResourceRequest::RedirectStatus) const;
- bool denyIfEnforcingPolicy() const { return m_reportOnly; }
+ bool denyIfEnforcingPolicy() const { return isReportOnly(); }
Member<ContentSecurityPolicy> m_policy;
@@ -150,7 +150,6 @@ private:
ContentSecurityPolicyHeaderType m_headerType;
ContentSecurityPolicyHeaderSource m_headerSource;
- bool m_reportOnly;
bool m_hasSandboxPolicy;
ReflectedXSSDisposition m_reflectedXSSDisposition;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698