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 27 matching lines...) Expand all Loading... |
38 #include "platform/Histogram.h" | 38 #include "platform/Histogram.h" |
39 #include "platform/tracing/TraceEvent.h" | 39 #include "platform/tracing/TraceEvent.h" |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 int totalPagesMeasuredCSSSampleId() { | 43 int totalPagesMeasuredCSSSampleId() { |
44 return 1; | 44 return 1; |
45 } | 45 } |
46 | 46 |
47 // Make sure update_use_counter_css.py was run which updates histograms.xml. | 47 // Make sure update_use_counter_css.py was run which updates histograms.xml. |
48 constexpr int kMaximumCSSSampleId = 549; | 48 constexpr int kMaximumCSSSampleId = 555; |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 namespace blink { | 52 namespace blink { |
53 | 53 |
54 int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram( | 54 int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram( |
55 CSSPropertyID cssPropertyID) { | 55 CSSPropertyID cssPropertyID) { |
56 switch (cssPropertyID) { | 56 switch (cssPropertyID) { |
57 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. | 57 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. |
58 case CSSPropertyColor: | 58 case CSSPropertyColor: |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 case CSSPropertyOffsetPosition: | 1059 case CSSPropertyOffsetPosition: |
1060 return 545; | 1060 return 545; |
1061 case CSSPropertyTextDecorationSkip: | 1061 case CSSPropertyTextDecorationSkip: |
1062 return 546; | 1062 return 546; |
1063 case CSSPropertyCaretColor: | 1063 case CSSPropertyCaretColor: |
1064 return 547; | 1064 return 547; |
1065 case CSSPropertyOffsetRotate: | 1065 case CSSPropertyOffsetRotate: |
1066 return 548; | 1066 return 548; |
1067 case CSSPropertyFontVariationSettings: | 1067 case CSSPropertyFontVariationSettings: |
1068 return 549; | 1068 return 549; |
| 1069 case CSSPropertyInlineSize: |
| 1070 return 550; |
| 1071 case CSSPropertyBlockSize: |
| 1072 return 551; |
| 1073 case CSSPropertyMinInlineSize: |
| 1074 return 552; |
| 1075 case CSSPropertyMinBlockSize: |
| 1076 return 553; |
| 1077 case CSSPropertyMaxInlineSize: |
| 1078 return 554; |
| 1079 case CSSPropertyMaxBlockSize: |
| 1080 return 555; |
1069 // 1. Add new features above this line (don't change the assigned numbers of | 1081 // 1. Add new features above this line (don't change the assigned numbers of |
1070 // the existing items). | 1082 // the existing items). |
1071 // 2. Update kMaximumCSSSampleId with the new maximum value. | 1083 // 2. Update kMaximumCSSSampleId with the new maximum value. |
1072 // 3. Run the update_use_counter_css.py script in | 1084 // 3. Run the update_use_counter_css.py script in |
1073 // chromium/src/tools/metrics/histograms to update the UMA histogram names. | 1085 // chromium/src/tools/metrics/histograms to update the UMA histogram names. |
1074 | 1086 |
1075 case CSSPropertyInvalid: | 1087 case CSSPropertyInvalid: |
1076 ASSERT_NOT_REACHED(); | 1088 ASSERT_NOT_REACHED(); |
1077 return 0; | 1089 return 0; |
1078 } | 1090 } |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 } | 1337 } |
1326 } | 1338 } |
1327 | 1339 |
1328 if (needsPagesMeasuredUpdate) | 1340 if (needsPagesMeasuredUpdate) |
1329 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); | 1341 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); |
1330 | 1342 |
1331 m_CSSBits.clearAll(); | 1343 m_CSSBits.clearAll(); |
1332 } | 1344 } |
1333 | 1345 |
1334 } // namespace blink | 1346 } // namespace blink |
OLD | NEW |