| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All rights reserved. | 2 * Copyright (C) 2012 Google, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 | 1219 |
| 1220 void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID property) { | 1220 void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID property) { |
| 1221 DCHECK(isCSSPropertyIDWithName(property)); | 1221 DCHECK(isCSSPropertyIDWithName(property)); |
| 1222 | 1222 |
| 1223 if (!isUseCounterEnabledForMode(cssParserMode) || m_muteCount) | 1223 if (!isUseCounterEnabledForMode(cssParserMode) || m_muteCount) |
| 1224 return; | 1224 return; |
| 1225 | 1225 |
| 1226 if (!m_CSSRecorded.quickGet(property)) { | 1226 if (!m_CSSRecorded.quickGet(property)) { |
| 1227 // Note that HTTPArchive tooling looks specifically for this event - see | 1227 // Note that HTTPArchive tooling looks specifically for this event - see |
| 1228 // https://github.com/HTTPArchive/httparchive/issues/59 | 1228 // https://github.com/HTTPArchive/httparchive/issues/59 |
| 1229 int sampleId = mapCSSPropertyIdToCSSSampleIdForHistogram(property); |
| 1229 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), | 1230 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), |
| 1230 "CSSFeatureFirstUsed", "feature", property); | 1231 "CSSFeatureFirstUsed", "feature", sampleId); |
| 1231 cssHistogram().count(mapCSSPropertyIdToCSSSampleIdForHistogram(property)); | 1232 cssHistogram().count(sampleId); |
| 1232 m_CSSRecorded.quickSet(property); | 1233 m_CSSRecorded.quickSet(property); |
| 1233 } | 1234 } |
| 1234 m_legacyCounter.countCSS(property); | 1235 m_legacyCounter.countCSS(property); |
| 1235 } | 1236 } |
| 1236 | 1237 |
| 1237 void UseCounter::count(Feature feature) { | 1238 void UseCounter::count(Feature feature) { |
| 1238 DCHECK(Deprecation::deprecationMessage(feature).isEmpty()); | 1239 DCHECK(Deprecation::deprecationMessage(feature).isEmpty()); |
| 1239 recordMeasurement(feature); | 1240 recordMeasurement(feature); |
| 1240 } | 1241 } |
| 1241 | 1242 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 } | 1345 } |
| 1345 } | 1346 } |
| 1346 | 1347 |
| 1347 if (needsPagesMeasuredUpdate) | 1348 if (needsPagesMeasuredUpdate) |
| 1348 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); | 1349 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); |
| 1349 | 1350 |
| 1350 m_CSSBits.clearAll(); | 1351 m_CSSBits.clearAll(); |
| 1351 } | 1352 } |
| 1352 | 1353 |
| 1353 } // namespace blink | 1354 } // namespace blink |
| OLD | NEW |