OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2016 Google Inc. All rights reserved. | 2 * Copyright (C) 2016 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 ? ContentSecurityPolicyHeaderTypeReport | 59 ? ContentSecurityPolicyHeaderTypeReport |
60 : ContentSecurityPolicyHeaderTypeEnforce; | 60 : ContentSecurityPolicyHeaderTypeEnforce; |
61 if (initializer.hasSourceFile()) | 61 if (initializer.hasSourceFile()) |
62 m_sourceFile = initializer.sourceFile(); | 62 m_sourceFile = initializer.sourceFile(); |
63 if (initializer.hasLineNumber()) | 63 if (initializer.hasLineNumber()) |
64 m_lineNumber = initializer.lineNumber(); | 64 m_lineNumber = initializer.lineNumber(); |
65 if (initializer.hasColumnNumber()) | 65 if (initializer.hasColumnNumber()) |
66 m_columnNumber = initializer.columnNumber(); | 66 m_columnNumber = initializer.columnNumber(); |
67 if (initializer.hasStatusCode()) | 67 if (initializer.hasStatusCode()) |
68 m_statusCode = initializer.statusCode(); | 68 m_statusCode = initializer.statusCode(); |
| 69 if (initializer.hasSample()) |
| 70 m_sample = initializer.sample(); |
69 } | 71 } |
70 | 72 |
71 const String& SecurityPolicyViolationEvent::disposition() const { | 73 const String& SecurityPolicyViolationEvent::disposition() const { |
72 DEFINE_STATIC_LOCAL(const String, enforce, (kEnforce)); | 74 DEFINE_STATIC_LOCAL(const String, enforce, (kEnforce)); |
73 DEFINE_STATIC_LOCAL(const String, report, (kReport)); | 75 DEFINE_STATIC_LOCAL(const String, report, (kReport)); |
74 | 76 |
75 if (m_disposition == ContentSecurityPolicyHeaderTypeReport) | 77 if (m_disposition == ContentSecurityPolicyHeaderTypeReport) |
76 return report; | 78 return report; |
77 return enforce; | 79 return enforce; |
78 } | 80 } |
79 | 81 |
80 } // namespace blink | 82 } // namespace blink |
OLD | NEW |