| 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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 DCHECK(isCSSPropertyIDWithName(property)); | 1223 DCHECK(isCSSPropertyIDWithName(property)); |
| 1224 | 1224 |
| 1225 if (!isUseCounterEnabledForMode(cssParserMode) || m_muteCount) | 1225 if (!isUseCounterEnabledForMode(cssParserMode) || m_muteCount) |
| 1226 return; | 1226 return; |
| 1227 | 1227 |
| 1228 if (!m_CSSRecorded.quickGet(property)) { | 1228 if (!m_CSSRecorded.quickGet(property)) { |
| 1229 // Note that HTTPArchive tooling looks specifically for this event - see | 1229 // Note that HTTPArchive tooling looks specifically for this event - see |
| 1230 // https://github.com/HTTPArchive/httparchive/issues/59 | 1230 // https://github.com/HTTPArchive/httparchive/issues/59 |
| 1231 int sampleId = mapCSSPropertyIdToCSSSampleIdForHistogram(property); | 1231 int sampleId = mapCSSPropertyIdToCSSSampleIdForHistogram(property); |
| 1232 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), | 1232 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), |
| 1233 "CSSFeatureFirstUsed", "feature", sampleId); | 1233 "CSSFirstUsed", "feature", sampleId); |
| 1234 cssHistogram().count(sampleId); | 1234 cssHistogram().count(sampleId); |
| 1235 m_CSSRecorded.quickSet(property); | 1235 m_CSSRecorded.quickSet(property); |
| 1236 } | 1236 } |
| 1237 m_legacyCounter.countCSS(property); | 1237 m_legacyCounter.countCSS(property); |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 void UseCounter::count(Feature feature) { | 1240 void UseCounter::count(Feature feature) { |
| 1241 DCHECK(Deprecation::deprecationMessage(feature).isEmpty()); | 1241 DCHECK(Deprecation::deprecationMessage(feature).isEmpty()); |
| 1242 recordMeasurement(feature); | 1242 recordMeasurement(feature); |
| 1243 } | 1243 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 } | 1347 } |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 if (needsPagesMeasuredUpdate) | 1350 if (needsPagesMeasuredUpdate) |
| 1351 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); | 1351 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); |
| 1352 | 1352 |
| 1353 m_CSSBits.clearAll(); | 1353 m_CSSBits.clearAll(); |
| 1354 } | 1354 } |
| 1355 | 1355 |
| 1356 } // namespace blink | 1356 } // namespace blink |
| OLD | NEW |