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

Unified Diff: third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp

Issue 2330353007: Add usage counters to XSSAuditor. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
index 4a453c27b96e54e175a8717cff36d2b07dbf0529..ea9a3d4dc5bc31f9079837778ef86b62302466f7 100644
--- a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
+++ b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
@@ -104,6 +104,10 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo)
{
ASSERT(isMainThread());
+ UseCounter::count(m_document, UseCounter::XSSAuditorBlockedScript);
+ if (xssInfo.m_didBlockEntirePage)
Tom Sepez 2016/09/15 16:39:08 maybe log one ore the other?
+ UseCounter::count(m_document, UseCounter::XSSAuditorBlockedScriptAndEntirePage);
+
m_document->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, xssInfo.buildConsoleError()));
FrameLoader& frameLoader = m_document->frame()->loader();

Powered by Google App Engine
This is Rietveld 408576698