| 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 917c357850da6959714a814c96fab55f4071fae8..c531c5ad27ec933086d98703359578bf2ce00793 100644
|
| --- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
|
| @@ -1058,8 +1058,8 @@ int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(
|
| return 544;
|
| case CSSPropertyOffsetPosition:
|
| return 545;
|
| - // 1. Add new features above this line (don't change the assigned numbers of the existing
|
| - // items).
|
| + // 1. Add new features above this line (don't change the assigned numbers of
|
| + // the existing items).
|
| // 2. Update kMaximumCSSSampleId with the new maximum value.
|
| // 3. Run the update_use_counter_css.py script in
|
| // chromium/src/tools/metrics/histograms to update the UMA histogram names.
|
| @@ -1097,7 +1097,8 @@ void UseCounter::recordMeasurement(Feature feature) {
|
| DCHECK(feature < NumberOfFeatures);
|
|
|
| if (!m_featuresRecorded.quickGet(feature)) {
|
| - // Note that HTTPArchive tooling looks specifically for this event - see https://github.com/HTTPArchive/httparchive/issues/59
|
| + // Note that HTTPArchive tooling looks specifically for this event - see
|
| + // https://github.com/HTTPArchive/httparchive/issues/59
|
| TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"),
|
| "FeatureFirstUsed", "feature", feature);
|
| featuresHistogram().count(feature);
|
| @@ -1220,7 +1221,8 @@ void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID property) {
|
| return;
|
|
|
| if (!m_CSSRecorded.quickGet(property)) {
|
| - // Note that HTTPArchive tooling looks specifically for this event - see https://github.com/HTTPArchive/httparchive/issues/59
|
| + // Note that HTTPArchive tooling looks specifically for this event - see
|
| + // https://github.com/HTTPArchive/httparchive/issues/59
|
| TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"),
|
| "CSSFeatureFirstUsed", "feature", property);
|
| cssHistogram().count(mapCSSPropertyIdToCSSSampleIdForHistogram(property));
|
| @@ -1256,8 +1258,9 @@ UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) {
|
|
|
| EnumerationHistogram& UseCounter::featuresHistogram() const {
|
| // TODO(rbyers): Fix the SVG case. crbug.com/236262
|
| - // Eg. every SVGImage has it's own Page instance, they should probably all be delegating
|
| - // their UseCounter to the containing Page. For now just use a separate histogram.
|
| + // Eg. every SVGImage has it's own Page instance, they should probably all be
|
| + // delegating their UseCounter to the containing Page. For now just use a
|
| + // separate histogram.
|
| DEFINE_STATIC_LOCAL(blink::EnumerationHistogram, histogram,
|
| ("WebCore.UseCounter_TEST.Features",
|
| blink::UseCounter::NumberOfFeatures));
|
| @@ -1281,7 +1284,8 @@ EnumerationHistogram& UseCounter::cssHistogram() const {
|
|
|
| /*
|
| *
|
| - * LEGACY metrics support - WebCore.FeatureObserver is to be superceded by WebCore.UseCounter
|
| + * LEGACY metrics support - WebCore.FeatureObserver is to be superceded by
|
| + * WebCore.UseCounter
|
| *
|
| */
|
|
|
| @@ -1297,8 +1301,8 @@ UseCounter::LegacyCounter::LegacyCounter()
|
| m_CSSBits(lastUnresolvedCSSProperty + 1) {}
|
|
|
| UseCounter::LegacyCounter::~LegacyCounter() {
|
| - // PageDestruction was intended to be used as a scale, but it's broken (due to fast shutdown).
|
| - // See https://crbug.com/597963.
|
| + // PageDestruction was intended to be used as a scale, but it's broken (due to
|
| + // fast shutdown). See https://crbug.com/597963.
|
| featureObserverHistogram().count(OBSOLETE_PageDestruction);
|
| updateMeasurements();
|
| }
|
| @@ -1321,9 +1325,9 @@ void UseCounter::LegacyCounter::updateMeasurements() {
|
| // Clearing count bits is timing sensitive.
|
| m_featureBits.clearAll();
|
|
|
| - // FIXME: Sometimes this function is called more than once per page. The following
|
| - // bool guards against incrementing the page count when there are no CSS
|
| - // bits set. https://crbug.com/236262.
|
| + // FIXME: Sometimes this function is called more than once per page. The
|
| + // following bool guards against incrementing the page count when there are no
|
| + // CSS bits set. https://crbug.com/236262.
|
| DEFINE_STATIC_LOCAL(
|
| EnumerationHistogram, cssPropertiesHistogram,
|
| ("WebCore.FeatureObserver.CSSProperties", kMaximumCSSSampleId));
|
|
|