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 28 matching lines...) Expand all Loading... |
39 #include "platform/instrumentation/tracing/TraceEvent.h" | 39 #include "platform/instrumentation/tracing/TraceEvent.h" |
40 #include "platform/weborigin/SchemeRegistry.h" | 40 #include "platform/weborigin/SchemeRegistry.h" |
41 | 41 |
42 namespace { | 42 namespace { |
43 | 43 |
44 int totalPagesMeasuredCSSSampleId() { | 44 int totalPagesMeasuredCSSSampleId() { |
45 return 1; | 45 return 1; |
46 } | 46 } |
47 | 47 |
48 // Make sure update_use_counter_css.py was run which updates histograms.xml. | 48 // Make sure update_use_counter_css.py was run which updates histograms.xml. |
49 constexpr int kMaximumCSSSampleId = 560; | 49 constexpr int kMaximumCSSSampleId = 584; |
50 | 50 |
51 } // namespace | 51 } // namespace |
52 | 52 |
53 namespace blink { | 53 namespace blink { |
54 | 54 |
55 int UseCounter::MapCSSPropertyIdToCSSSampleIdForHistogram( | 55 int UseCounter::MapCSSPropertyIdToCSSSampleIdForHistogram( |
56 CSSPropertyID css_property_id) { | 56 CSSPropertyID css_property_id) { |
57 switch (css_property_id) { | 57 switch (css_property_id) { |
58 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. | 58 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. |
59 case CSSPropertyColor: | 59 case CSSPropertyColor: |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 case CSSPropertyAliasWebkitOrder: | 956 case CSSPropertyAliasWebkitOrder: |
957 return 495; | 957 return 495; |
958 case CSSPropertyAliasWebkitShapeImageThreshold: | 958 case CSSPropertyAliasWebkitShapeImageThreshold: |
959 return 496; | 959 return 496; |
960 case CSSPropertyAliasWebkitShapeMargin: | 960 case CSSPropertyAliasWebkitShapeMargin: |
961 return 497; | 961 return 497; |
962 case CSSPropertyAliasWebkitShapeOutside: | 962 case CSSPropertyAliasWebkitShapeOutside: |
963 return 498; | 963 return 498; |
964 case CSSPropertyScrollSnapType: | 964 case CSSPropertyScrollSnapType: |
965 return 499; | 965 return 499; |
966 case CSSPropertyScrollSnapPointsX: | 966 // CSSPropertyScrollSnapPointsX was 500. |
967 return 500; | 967 // CSSPropertyScrollSnapPointsY was 501. |
968 case CSSPropertyScrollSnapPointsY: | 968 // CSSPropertyScrollSnapCoordinate was 502. |
969 return 501; | 969 // CSSPropertyScrollSnapDestination was 503. |
970 case CSSPropertyScrollSnapCoordinate: | |
971 return 502; | |
972 case CSSPropertyScrollSnapDestination: | |
973 return 503; | |
974 case CSSPropertyTranslate: | 970 case CSSPropertyTranslate: |
975 return 504; | 971 return 504; |
976 case CSSPropertyRotate: | 972 case CSSPropertyRotate: |
977 return 505; | 973 return 505; |
978 case CSSPropertyScale: | 974 case CSSPropertyScale: |
979 return 506; | 975 return 506; |
980 case CSSPropertyImageOrientation: | 976 case CSSPropertyImageOrientation: |
981 return 507; | 977 return 507; |
982 case CSSPropertyBackdropFilter: | 978 case CSSPropertyBackdropFilter: |
983 return 508; | 979 return 508; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 case CSSPropertyAliasLineBreak: | 1073 case CSSPropertyAliasLineBreak: |
1078 return 556; | 1074 return 556; |
1079 case CSSPropertyPlaceContent: | 1075 case CSSPropertyPlaceContent: |
1080 return 557; | 1076 return 557; |
1081 case CSSPropertyPlaceItems: | 1077 case CSSPropertyPlaceItems: |
1082 return 558; | 1078 return 558; |
1083 case CSSPropertyTransformBox: | 1079 case CSSPropertyTransformBox: |
1084 return 559; | 1080 return 559; |
1085 case CSSPropertyPlaceSelf: | 1081 case CSSPropertyPlaceSelf: |
1086 return 560; | 1082 return 560; |
| 1083 case CSSPropertyScrollSnapAlign: |
| 1084 return 561; |
| 1085 case CSSPropertyScrollPadding: |
| 1086 return 562; |
| 1087 case CSSPropertyScrollPaddingTop: |
| 1088 return 563; |
| 1089 case CSSPropertyScrollPaddingRight: |
| 1090 return 564; |
| 1091 case CSSPropertyScrollPaddingBottom: |
| 1092 return 565; |
| 1093 case CSSPropertyScrollPaddingLeft: |
| 1094 return 566; |
| 1095 case CSSPropertyScrollPaddingBlock: |
| 1096 return 567; |
| 1097 case CSSPropertyScrollPaddingBlockStart: |
| 1098 return 568; |
| 1099 case CSSPropertyScrollPaddingBlockEnd: |
| 1100 return 569; |
| 1101 case CSSPropertyScrollPaddingInline: |
| 1102 return 570; |
| 1103 case CSSPropertyScrollPaddingInlineStart: |
| 1104 return 571; |
| 1105 case CSSPropertyScrollPaddingInlineEnd: |
| 1106 return 572; |
| 1107 case CSSPropertyScrollSnapMargin: |
| 1108 return 573; |
| 1109 case CSSPropertyScrollSnapMarginTop: |
| 1110 return 574; |
| 1111 case CSSPropertyScrollSnapMarginRight: |
| 1112 return 575; |
| 1113 case CSSPropertyScrollSnapMarginBottom: |
| 1114 return 576; |
| 1115 case CSSPropertyScrollSnapMarginLeft: |
| 1116 return 577; |
| 1117 case CSSPropertyScrollSnapMarginBlock: |
| 1118 return 578; |
| 1119 case CSSPropertyScrollSnapMarginBlockStart: |
| 1120 return 579; |
| 1121 case CSSPropertyScrollSnapMarginBlockEnd: |
| 1122 return 580; |
| 1123 case CSSPropertyScrollSnapMarginInline: |
| 1124 return 581; |
| 1125 case CSSPropertyScrollSnapMarginInlineStart: |
| 1126 return 582; |
| 1127 case CSSPropertyScrollSnapMarginInlineEnd: |
| 1128 return 583; |
| 1129 case CSSPropertyScrollSnapStop: |
| 1130 return 584; |
1087 // 1. Add new features above this line (don't change the assigned numbers of | 1131 // 1. Add new features above this line (don't change the assigned numbers of |
1088 // the existing items). | 1132 // the existing items). |
1089 // 2. Update kMaximumCSSSampleId with the new maximum value. | 1133 // 2. Update kMaximumCSSSampleId with the new maximum value. |
1090 // 3. Run the update_use_counter_css.py script in | 1134 // 3. Run the update_use_counter_css.py script in |
1091 // chromium/src/tools/metrics/histograms to update the UMA histogram names. | 1135 // chromium/src/tools/metrics/histograms to update the UMA histogram names. |
1092 | 1136 |
1093 case CSSPropertyInvalid: | 1137 case CSSPropertyInvalid: |
1094 NOTREACHED(); | 1138 NOTREACHED(); |
1095 return 0; | 1139 return 0; |
1096 } | 1140 } |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 } | 1477 } |
1434 } | 1478 } |
1435 | 1479 |
1436 if (needs_pages_measured_update) | 1480 if (needs_pages_measured_update) |
1437 css_properties_histogram.Count(totalPagesMeasuredCSSSampleId()); | 1481 css_properties_histogram.Count(totalPagesMeasuredCSSSampleId()); |
1438 | 1482 |
1439 css_bits_.ClearAll(); | 1483 css_bits_.ClearAll(); |
1440 } | 1484 } |
1441 | 1485 |
1442 } // namespace blink | 1486 } // namespace blink |
OLD | NEW |