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

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

Issue 2330353007: Add usage counters to XSSAuditor. (Closed)
Patch Set: Fixed 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
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5e5790dd01f65d0b6c5a404ccfab70bdc2b6117b 100644
--- a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
+++ b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
@@ -104,6 +104,8 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo)
{
ASSERT(isMainThread());
+ UseCounter::count(m_document, xssInfo.m_didBlockEntirePage ? UseCounter::XSSAuditorBlockedEntirePage : UseCounter::XSSAuditorBlockedScript);
+
m_document->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, xssInfo.buildConsoleError()));
FrameLoader& frameLoader = m_document->frame()->loader();
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698