OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Extract UserMetrics "actions" strings from the Chrome source. | 7 """Extract UserMetrics "actions" strings from the Chrome source. |
8 | 8 |
9 This program generates the list of known actions we expect to see in the | 9 This program generates the list of known actions we expect to see in the |
10 user behavior logs. It walks the Chrome source, looking for calls to | 10 user behavior logs. It walks the Chrome source, looking for calls to |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 | 550 |
551 Arguments | 551 Arguments |
552 actions: set of actions to add to. | 552 actions: set of actions to add to. |
553 """ | 553 """ |
554 actions.add('KeySystemSupport.Widevine.Queried') | 554 actions.add('KeySystemSupport.Widevine.Queried') |
555 actions.add('KeySystemSupport.WidevineWithType.Queried') | 555 actions.add('KeySystemSupport.WidevineWithType.Queried') |
556 actions.add('KeySystemSupport.Widevine.Supported') | 556 actions.add('KeySystemSupport.Widevine.Supported') |
557 actions.add('KeySystemSupport.WidevineWithType.Supported') | 557 actions.add('KeySystemSupport.WidevineWithType.Supported') |
558 | 558 |
559 def AddAutomaticResetBannerActions(actions): | 559 def AddAutomaticResetBannerActions(actions): |
560 """Add actions that are used for the automatic profile settings reset banner | 560 """Add actions that are used for the automatic profile settings reset banners |
561 in chrome://settings. | 561 in chrome://settings. |
562 | 562 |
563 Arguments | 563 Arguments |
564 actions: set of actions to add to. | 564 actions: set of actions to add to. |
565 """ | 565 """ |
| 566 # These actions relate to the the automatic settings reset banner shown as |
| 567 # a result of the reset prompt. |
566 actions.add('AutomaticReset_WebUIBanner_BannerShown') | 568 actions.add('AutomaticReset_WebUIBanner_BannerShown') |
567 actions.add('AutomaticReset_WebUIBanner_ManuallyClosed') | 569 actions.add('AutomaticReset_WebUIBanner_ManuallyClosed') |
568 actions.add('AutomaticReset_WebUIBanner_ResetClicked') | 570 actions.add('AutomaticReset_WebUIBanner_ResetClicked') |
569 | 571 |
| 572 # These actions relate to the the automatic settings reset banner shown as |
| 573 # a result of settings hardening. |
| 574 actions.add('AutomaticSettingsReset_WebUIBanner_BannerShown') |
| 575 actions.add('AutomaticSettingsReset_WebUIBanner_ManuallyClosed') |
| 576 actions.add('AutomaticSettingsReset_WebUIBanner_LearnMoreClicked') |
| 577 |
570 def main(argv): | 578 def main(argv): |
571 if '--hash' in argv: | 579 if '--hash' in argv: |
572 hash_output = True | 580 hash_output = True |
573 else: | 581 else: |
574 hash_output = False | 582 hash_output = False |
575 print >>sys.stderr, "WARNING: If you added new UMA tags, you must" + \ | 583 print >>sys.stderr, "WARNING: If you added new UMA tags, you must" + \ |
576 " use the --hash option to update chromeactions.txt." | 584 " use the --hash option to update chromeactions.txt." |
577 # if we do a hash output, we want to only append NEW actions, and we know | 585 # if we do a hash output, we want to only append NEW actions, and we know |
578 # the file we want to work on | 586 # the file we want to work on |
579 actions = set() | 587 actions = set() |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 else: | 630 else: |
623 print action | 631 print action |
624 | 632 |
625 if hash_output: | 633 if hash_output: |
626 print "Done. Do not forget to add chromeactions.txt to your changelist" | 634 print "Done. Do not forget to add chromeactions.txt to your changelist" |
627 return 0 | 635 return 0 |
628 | 636 |
629 | 637 |
630 if '__main__' == __name__: | 638 if '__main__' == __name__: |
631 sys.exit(main(sys.argv)) | 639 sys.exit(main(sys.argv)) |
OLD | NEW |