diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/parser/XSSAuditorDelegate.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/parser/XSSAuditorDelegate.h')
-rw-r--r-- | Source/WebCore/html/parser/XSSAuditorDelegate.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/Source/WebCore/html/parser/XSSAuditorDelegate.h b/Source/WebCore/html/parser/XSSAuditorDelegate.h index e12760e32..67a32ed93 100644 --- a/Source/WebCore/html/parser/XSSAuditorDelegate.h +++ b/Source/WebCore/html/parser/XSSAuditorDelegate.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2013 Google, Inc. All Rights Reserved. + * Copyright (C) 2017 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,13 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef XSSAuditorDelegate_h -#define XSSAuditorDelegate_h +#pragma once #include "URL.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> -#include <wtf/Vector.h> #include <wtf/text/TextPosition.h> namespace WebCore { @@ -37,23 +34,25 @@ namespace WebCore { class Document; class FormData; +// FIXME: Should change into a struct. +// FIXME: Should return by value instead of using a unique_ptr. class XSSInfo { + WTF_MAKE_FAST_ALLOCATED; public: - XSSInfo(bool didBlockEntirePage, bool didSendXSSProtectionHeader, bool didSendCSPHeader) - : m_didBlockEntirePage(didBlockEntirePage) + XSSInfo(const String& originalURL, bool didBlockEntirePage, bool didSendXSSProtectionHeader) + : m_originalURL(originalURL.isolatedCopy()) + , m_didBlockEntirePage(didBlockEntirePage) , m_didSendXSSProtectionHeader(didSendXSSProtectionHeader) - , m_didSendCSPHeader(didSendCSPHeader) { } + String m_originalURL; bool m_didBlockEntirePage; bool m_didSendXSSProtectionHeader; - bool m_didSendCSPHeader; TextPosition m_textPosition; }; class XSSAuditorDelegate { - WTF_MAKE_NONCOPYABLE(XSSAuditorDelegate); public: explicit XSSAuditorDelegate(Document&); @@ -61,13 +60,11 @@ public: void setReportURL(const URL& url) { m_reportURL = url; } private: - PassRefPtr<FormData> generateViolationReport(); + Ref<FormData> generateViolationReport(const XSSInfo&); Document& m_document; - bool m_didSendNotifications; + bool m_didSendNotifications { false }; URL m_reportURL; }; -} - -#endif +} // namespace WebCore |