| 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 = 563; | 
|    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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1077     case CSSPropertyAliasLineBreak: |  1077     case CSSPropertyAliasLineBreak: | 
|  1078       return 556; |  1078       return 556; | 
|  1079     case CSSPropertyPlaceContent: |  1079     case CSSPropertyPlaceContent: | 
|  1080       return 557; |  1080       return 557; | 
|  1081     case CSSPropertyPlaceItems: |  1081     case CSSPropertyPlaceItems: | 
|  1082       return 558; |  1082       return 558; | 
|  1083     case CSSPropertyTransformBox: |  1083     case CSSPropertyTransformBox: | 
|  1084       return 559; |  1084       return 559; | 
|  1085     case CSSPropertyPlaceSelf: |  1085     case CSSPropertyPlaceSelf: | 
|  1086       return 560; |  1086       return 560; | 
 |  1087     case CSSPropertyScrollBoundaryBehavior: | 
 |  1088       return 561; | 
 |  1089     case CSSPropertyScrollBoundaryBehaviorX: | 
 |  1090       return 562; | 
 |  1091     case CSSPropertyScrollBoundaryBehaviorY: | 
 |  1092       return 563; | 
|  1087     // 1. Add new features above this line (don't change the assigned numbers of |  1093     // 1. Add new features above this line (don't change the assigned numbers of | 
|  1088     // the existing items). |  1094     // the existing items). | 
|  1089     // 2. Update kMaximumCSSSampleId with the new maximum value. |  1095     // 2. Update kMaximumCSSSampleId with the new maximum value. | 
|  1090     // 3. Run the update_use_counter_css.py script in |  1096     // 3. Run the update_use_counter_css.py script in | 
|  1091     // chromium/src/tools/metrics/histograms to update the UMA histogram names. |  1097     // chromium/src/tools/metrics/histograms to update the UMA histogram names. | 
|  1092  |  1098  | 
|  1093     case CSSPropertyInvalid: |  1099     case CSSPropertyInvalid: | 
|  1094       NOTREACHED(); |  1100       NOTREACHED(); | 
|  1095       return 0; |  1101       return 0; | 
|  1096   } |  1102   } | 
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1410     } |  1416     } | 
|  1411   } |  1417   } | 
|  1412  |  1418  | 
|  1413   if (needs_pages_measured_update) |  1419   if (needs_pages_measured_update) | 
|  1414     css_properties_histogram.Count(totalPagesMeasuredCSSSampleId()); |  1420     css_properties_histogram.Count(totalPagesMeasuredCSSSampleId()); | 
|  1415  |  1421  | 
|  1416   css_bits_.ClearAll(); |  1422   css_bits_.ClearAll(); | 
|  1417 } |  1423 } | 
|  1418  |  1424  | 
|  1419 }  // namespace blink |  1425 }  // namespace blink | 
| OLD | NEW |