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

Unified Diff: third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h

Issue 2331213002: Add `disposition` to SecurityPolicyViolationEvent (Closed)
Patch Set: Update SecurityPolicyViolationEventInit.idl, update test 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
Index: third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h
diff --git a/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h b/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h
index 4524324255fad68de7cfb5995485238852609d4b..d291d13c8d4337cc0c9bbf3565263a2da9246111 100644
--- a/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h
+++ b/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h
@@ -27,6 +27,7 @@
#include "core/events/Event.h"
#include "core/events/SecurityPolicyViolationEventInit.h"
+#include "platform/network/ContentSecurityPolicyParsers.h"
namespace blink {
@@ -44,6 +45,7 @@ public:
const String& violatedDirective() const { return m_violatedDirective; }
const String& effectiveDirective() const { return m_effectiveDirective; }
const String& originalPolicy() const { return m_originalPolicy; }
+ const String& disposition() const;
const String& sourceFile() const { return m_sourceFile; }
int lineNumber() const { return m_lineNumber; }
int columnNumber() const { return m_columnNumber; }
@@ -54,33 +56,7 @@ public:
DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); }
private:
- SecurityPolicyViolationEvent(const AtomicString& type, const SecurityPolicyViolationEventInit& initializer)
- : Event(type, initializer)
- , m_lineNumber(0)
- , m_columnNumber(0)
- , m_statusCode(0)
- {
- if (initializer.hasDocumentURI())
- m_documentURI = initializer.documentURI();
- if (initializer.hasReferrer())
- m_referrer = initializer.referrer();
- if (initializer.hasBlockedURI())
- m_blockedURI = initializer.blockedURI();
- if (initializer.hasViolatedDirective())
- m_violatedDirective = initializer.violatedDirective();
- if (initializer.hasEffectiveDirective())
- m_effectiveDirective = initializer.effectiveDirective();
- if (initializer.hasOriginalPolicy())
- m_originalPolicy = initializer.originalPolicy();
- if (initializer.hasSourceFile())
- m_sourceFile = initializer.sourceFile();
- if (initializer.hasLineNumber())
- m_lineNumber = initializer.lineNumber();
- if (initializer.hasColumnNumber())
- m_columnNumber = initializer.columnNumber();
- if (initializer.hasStatusCode())
- m_statusCode = initializer.statusCode();
- }
+ SecurityPolicyViolationEvent(const AtomicString& type, const SecurityPolicyViolationEventInit& initializer);
String m_documentURI;
String m_referrer;
@@ -88,6 +64,7 @@ private:
String m_violatedDirective;
String m_effectiveDirective;
String m_originalPolicy;
+ ContentSecurityPolicyHeaderType m_disposition;
String m_sourceFile;
int m_lineNumber;
int m_columnNumber;

Powered by Google App Engine
This is Rietveld 408576698