Index: Source/core/html/parser/XSSAuditorDelegate.cpp |
diff --git a/Source/core/html/parser/XSSAuditorDelegate.cpp b/Source/core/html/parser/XSSAuditorDelegate.cpp |
index b13435db3fa1ec9b0dd144df6341095628655c93..6ca498a9ca1b4d8ef9835ba2018297218987c43d 100644 |
--- a/Source/core/html/parser/XSSAuditorDelegate.cpp |
+++ b/Source/core/html/parser/XSSAuditorDelegate.cpp |
@@ -28,6 +28,7 @@ |
#include "core/dom/Document.h" |
#include "core/frame/LocalFrame.h" |
+#include "core/frame/Settings.h" |
#include "core/inspector/ConsoleMessage.h" |
#include "core/loader/DocumentLoader.h" |
#include "core/loader/FrameLoader.h" |
@@ -117,7 +118,7 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo) |
frameLoader.client()->didDetectXSS(m_document->url(), xssInfo.m_didBlockEntirePage); |
- if (!m_reportURL.isEmpty()) |
+ if (!m_reportURL.isEmpty() && !m_document->settings()->xssViolationReportsUploadOptOut()) |
PingLoader::sendViolationReport(m_document->frame(), m_reportURL, generateViolationReport(xssInfo), PingLoader::XSSAuditorViolationReport); |
} |