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

Side by Side Diff: third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.h

Issue 2436003002: CSP: Add 'script-sample' to violation reports. (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 const String& documentURI() const { return m_documentURI; } 45 const String& documentURI() const { return m_documentURI; }
46 const String& referrer() const { return m_referrer; } 46 const String& referrer() const { return m_referrer; }
47 const String& blockedURI() const { return m_blockedURI; } 47 const String& blockedURI() const { return m_blockedURI; }
48 const String& violatedDirective() const { return m_violatedDirective; } 48 const String& violatedDirective() const { return m_violatedDirective; }
49 const String& effectiveDirective() const { return m_effectiveDirective; } 49 const String& effectiveDirective() const { return m_effectiveDirective; }
50 const String& originalPolicy() const { return m_originalPolicy; } 50 const String& originalPolicy() const { return m_originalPolicy; }
51 const String& disposition() const; 51 const String& disposition() const;
52 const String& sourceFile() const { return m_sourceFile; } 52 const String& sourceFile() const { return m_sourceFile; }
53 const String& sample() const { return m_sample; }
53 int lineNumber() const { return m_lineNumber; } 54 int lineNumber() const { return m_lineNumber; }
54 int columnNumber() const { return m_columnNumber; } 55 int columnNumber() const { return m_columnNumber; }
55 uint16_t statusCode() const { return m_statusCode; } 56 uint16_t statusCode() const { return m_statusCode; }
56 57
57 const AtomicString& interfaceName() const override { 58 const AtomicString& interfaceName() const override {
58 return EventNames::SecurityPolicyViolationEvent; 59 return EventNames::SecurityPolicyViolationEvent;
59 } 60 }
60 61
61 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); } 62 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); }
62 63
63 private: 64 private:
64 SecurityPolicyViolationEvent( 65 SecurityPolicyViolationEvent(
65 const AtomicString& type, 66 const AtomicString& type,
66 const SecurityPolicyViolationEventInit& initializer); 67 const SecurityPolicyViolationEventInit& initializer);
67 68
68 String m_documentURI; 69 String m_documentURI;
69 String m_referrer; 70 String m_referrer;
70 String m_blockedURI; 71 String m_blockedURI;
71 String m_violatedDirective; 72 String m_violatedDirective;
72 String m_effectiveDirective; 73 String m_effectiveDirective;
73 String m_originalPolicy; 74 String m_originalPolicy;
74 ContentSecurityPolicyHeaderType m_disposition; 75 ContentSecurityPolicyHeaderType m_disposition;
75 String m_sourceFile; 76 String m_sourceFile;
77 String m_sample;
76 int m_lineNumber; 78 int m_lineNumber;
77 int m_columnNumber; 79 int m_columnNumber;
78 int m_statusCode; 80 int m_statusCode;
79 }; 81 };
80 82
81 } // namespace blink 83 } // namespace blink
82 84
83 #endif // SecurityPolicyViolationEvent_h 85 #endif // SecurityPolicyViolationEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698