| 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 25 matching lines...) Expand all Loading... |
| 36 #include "core/inspector/ConsoleMessage.h" | 36 #include "core/inspector/ConsoleMessage.h" |
| 37 #include "core/workers/WorkerGlobalScope.h" | 37 #include "core/workers/WorkerGlobalScope.h" |
| 38 #include "platform/Histogram.h" | 38 #include "platform/Histogram.h" |
| 39 #include "platform/TraceEvent.h" | 39 #include "platform/TraceEvent.h" |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 int totalPagesMeasuredCSSSampleId() { return 1; } | 43 int totalPagesMeasuredCSSSampleId() { return 1; } |
| 44 | 44 |
| 45 // Make sure update_use_counter_css.py was run which updates histograms.xml. | 45 // Make sure update_use_counter_css.py was run which updates histograms.xml. |
| 46 int maximumCSSSampleId() { return 539; } | 46 int maximumCSSSampleId() { return 543; } |
| 47 | 47 |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 namespace blink { | 50 namespace blink { |
| 51 | 51 |
| 52 int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyID cssPrope
rtyID) | 52 int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyID cssPrope
rtyID) |
| 53 { | 53 { |
| 54 switch (cssPropertyID) { | 54 switch (cssPropertyID) { |
| 55 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. | 55 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. |
| 56 case CSSPropertyColor: return 2; | 56 case CSSPropertyColor: return 2; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 case CSSPropertyTransform: return 446; | 481 case CSSPropertyTransform: return 446; |
| 482 case CSSPropertyTransformOrigin: return 447; | 482 case CSSPropertyTransformOrigin: return 447; |
| 483 case CSSPropertyTransformStyle: return 448; | 483 case CSSPropertyTransformStyle: return 448; |
| 484 case CSSPropertyPerspective: return 449; | 484 case CSSPropertyPerspective: return 449; |
| 485 case CSSPropertyPerspectiveOrigin: return 450; | 485 case CSSPropertyPerspectiveOrigin: return 450; |
| 486 case CSSPropertyBackfaceVisibility: return 451; | 486 case CSSPropertyBackfaceVisibility: return 451; |
| 487 case CSSPropertyGridTemplate: return 452; | 487 case CSSPropertyGridTemplate: return 452; |
| 488 case CSSPropertyGrid: return 453; | 488 case CSSPropertyGrid: return 453; |
| 489 case CSSPropertyAll: return 454; | 489 case CSSPropertyAll: return 454; |
| 490 case CSSPropertyJustifyItems: return 455; | 490 case CSSPropertyJustifyItems: return 455; |
| 491 case CSSPropertyMotionPath: return 457; | 491 case CSSPropertyAliasMotionPath: return 457; |
| 492 case CSSPropertyMotionOffset: return 458; | 492 case CSSPropertyAliasMotionOffset: return 458; |
| 493 case CSSPropertyMotionRotation: return 459; | 493 case CSSPropertyAliasMotionRotation: return 459; |
| 494 case CSSPropertyMotion: return 460; | 494 case CSSPropertyMotion: return 460; |
| 495 case CSSPropertyX: return 461; | 495 case CSSPropertyX: return 461; |
| 496 case CSSPropertyY: return 462; | 496 case CSSPropertyY: return 462; |
| 497 case CSSPropertyRx: return 463; | 497 case CSSPropertyRx: return 463; |
| 498 case CSSPropertyRy: return 464; | 498 case CSSPropertyRy: return 464; |
| 499 case CSSPropertyFontSizeAdjust: return 465; | 499 case CSSPropertyFontSizeAdjust: return 465; |
| 500 case CSSPropertyCx: return 466; | 500 case CSSPropertyCx: return 466; |
| 501 case CSSPropertyCy: return 467; | 501 case CSSPropertyCy: return 467; |
| 502 case CSSPropertyR: return 468; | 502 case CSSPropertyR: return 468; |
| 503 case CSSPropertyAliasEpubCaptionSide: return 469; | 503 case CSSPropertyAliasEpubCaptionSide: return 469; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 case CSSPropertyColumnWidth: return 530; | 564 case CSSPropertyColumnWidth: return 530; |
| 565 case CSSPropertyColumns: return 531; | 565 case CSSPropertyColumns: return 531; |
| 566 case CSSPropertyApplyAtRule: return 532; | 566 case CSSPropertyApplyAtRule: return 532; |
| 567 case CSSPropertyFontVariantCaps: return 533; | 567 case CSSPropertyFontVariantCaps: return 533; |
| 568 case CSSPropertyHyphens: return 534; | 568 case CSSPropertyHyphens: return 534; |
| 569 case CSSPropertyFontVariantNumeric: return 535; | 569 case CSSPropertyFontVariantNumeric: return 535; |
| 570 case CSSPropertyTextSizeAdjust: return 536; | 570 case CSSPropertyTextSizeAdjust: return 536; |
| 571 case CSSPropertyAliasWebkitTextSizeAdjust: return 537; | 571 case CSSPropertyAliasWebkitTextSizeAdjust: return 537; |
| 572 case CSSPropertyOverflowAnchor: return 538; | 572 case CSSPropertyOverflowAnchor: return 538; |
| 573 case CSSPropertyUserSelect: return 539; | 573 case CSSPropertyUserSelect: return 539; |
| 574 case CSSPropertyOffsetDistance: return 540; |
| 575 case CSSPropertyOffsetPath: return 541; |
| 576 case CSSPropertyOffsetRotation: return 542; |
| 577 case CSSPropertyOffset: return 543; |
| 574 // 1. Add new features above this line (don't change the assigned numbers of
the existing | 578 // 1. Add new features above this line (don't change the assigned numbers of
the existing |
| 575 // items). | 579 // items). |
| 576 // 2. Update maximumCSSSampleId() with the new maximum value. | 580 // 2. Update maximumCSSSampleId() with the new maximum value. |
| 577 // 3. Run the update_use_counter_css.py script in | 581 // 3. Run the update_use_counter_css.py script in |
| 578 // chromium/src/tools/metrics/histograms to update the UMA histogram names. | 582 // chromium/src/tools/metrics/histograms to update the UMA histogram names. |
| 579 | 583 |
| 580 case CSSPropertyInvalid: | 584 case CSSPropertyInvalid: |
| 581 ASSERT_NOT_REACHED(); | 585 ASSERT_NOT_REACHED(); |
| 582 return 0; | 586 return 0; |
| 583 } | 587 } |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 } | 859 } |
| 856 } | 860 } |
| 857 | 861 |
| 858 if (needsPagesMeasuredUpdate) | 862 if (needsPagesMeasuredUpdate) |
| 859 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); | 863 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); |
| 860 | 864 |
| 861 m_CSSBits.clearAll(); | 865 m_CSSBits.clearAll(); |
| 862 } | 866 } |
| 863 | 867 |
| 864 } // namespace blink | 868 } // namespace blink |
| OLD | NEW |