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

Unified Diff: third_party/WebKit/Source/core/frame/UseCounter.cpp

Issue 2796283005: Adding UseCounter specific for extensions (Closed)
Patch Set: Created 3 years, 8 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/frame/UseCounter.h ('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/frame/UseCounter.cpp
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp
index 6c363695c2ef34a4f9d0a9ca6274b69d8ad3ca28..cb928475a0ac592967234e6e01324f769902c97c 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
+++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -1175,7 +1175,10 @@ void UseCounter::didCommitLoad(KURL url) {
m_CSSRecorded.clearAll();
m_animatedCSSRecorded.clearAll();
if (!m_disableReporting && !m_muteCount) {
- featuresHistogram().count(PageVisits);
+ if (url.protocolIs("chrome-extension"))
Rick Byers 2017/04/07 17:46:54 I think m_disableReporting will still be true in t
+ extensionFeaturesHistogram().count(PageVisits);
+ else
+ featuresHistogram().count(PageVisits);
cssHistogram().count(totalPagesMeasuredCSSSampleId());
animatedCSSHistogram().count(totalPagesMeasuredCSSSampleId());
}
@@ -1334,6 +1337,13 @@ EnumerationHistogram& UseCounter::featuresHistogram() const {
return m_context == SVGImageContext ? svgHistogram : histogram;
}
+EnumerationHistogram& UseCounter::extensionFeaturesHistogram() const {
+ DEFINE_STATIC_LOCAL(blink::EnumerationHistogram, histogram,
+ ("Blink.UseCounter.Extensions.Features",
+ blink::UseCounter::NumberOfFeatures));
+ return histogram;
+}
+
EnumerationHistogram& UseCounter::cssHistogram() const {
DEFINE_STATIC_LOCAL(blink::EnumerationHistogram, histogram,
("Blink.UseCounter.CSSProperties", kMaximumCSSSampleId));
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698