| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 #include "platform/weborigin/KURL.h" | 30 #include "platform/weborigin/KURL.h" |
| 31 #include "wtf/OwnPtr.h" | 31 #include "wtf/OwnPtr.h" |
| 32 #include "wtf/PassOwnPtr.h" | 32 #include "wtf/PassOwnPtr.h" |
| 33 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
| 34 #include "wtf/text/TextPosition.h" | 34 #include "wtf/text/TextPosition.h" |
| 35 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class Document; | 39 class Document; |
| 40 class FormData; | 40 class EncodedFormData; |
| 41 | 41 |
| 42 class XSSInfo { | 42 class XSSInfo { |
| 43 WTF_MAKE_FAST_ALLOCATED(XSSInfo); | 43 WTF_MAKE_FAST_ALLOCATED(XSSInfo); |
| 44 WTF_MAKE_NONCOPYABLE(XSSInfo); | 44 WTF_MAKE_NONCOPYABLE(XSSInfo); |
| 45 public: | 45 public: |
| 46 static PassOwnPtr<XSSInfo> create(const String& originalURL, bool didBlockEn
tirePage, bool didSendXSSProtectionHeader, bool didSendCSPHeader) | 46 static PassOwnPtr<XSSInfo> create(const String& originalURL, bool didBlockEn
tirePage, bool didSendXSSProtectionHeader, bool didSendCSPHeader) |
| 47 { | 47 { |
| 48 return adoptPtr(new XSSInfo(originalURL, didBlockEntirePage, didSendXSSP
rotectionHeader, didSendCSPHeader)); | 48 return adoptPtr(new XSSInfo(originalURL, didBlockEntirePage, didSendXSSP
rotectionHeader, didSendCSPHeader)); |
| 49 } | 49 } |
| 50 | 50 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 70 DISALLOW_ALLOCATION(); | 70 DISALLOW_ALLOCATION(); |
| 71 WTF_MAKE_NONCOPYABLE(XSSAuditorDelegate); | 71 WTF_MAKE_NONCOPYABLE(XSSAuditorDelegate); |
| 72 public: | 72 public: |
| 73 explicit XSSAuditorDelegate(Document*); | 73 explicit XSSAuditorDelegate(Document*); |
| 74 DECLARE_TRACE(); | 74 DECLARE_TRACE(); |
| 75 | 75 |
| 76 void didBlockScript(const XSSInfo&); | 76 void didBlockScript(const XSSInfo&); |
| 77 void setReportURL(const KURL& url) { m_reportURL = url; } | 77 void setReportURL(const KURL& url) { m_reportURL = url; } |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 PassRefPtr<FormData> generateViolationReport(const XSSInfo&); | 80 PassRefPtr<EncodedFormData> generateViolationReport(const XSSInfo&); |
| 81 | 81 |
| 82 RawPtrWillBeMember<Document> m_document; | 82 RawPtrWillBeMember<Document> m_document; |
| 83 bool m_didSendNotifications; | 83 bool m_didSendNotifications; |
| 84 KURL m_reportURL; | 84 KURL m_reportURL; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 typedef Vector<OwnPtr<XSSInfo>> XSSInfoStream; | 87 typedef Vector<OwnPtr<XSSInfo>> XSSInfoStream; |
| 88 | 88 |
| 89 } | 89 } |
| 90 | 90 |
| 91 #endif | 91 #endif |
| OLD | NEW |