| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 actions.add('MobileTabStripNewTab') | 303 actions.add('MobileTabStripNewTab') |
| 304 actions.add('MobileTabSwitched') | 304 actions.add('MobileTabSwitched') |
| 305 actions.add('MobileToolbarBack') | 305 actions.add('MobileToolbarBack') |
| 306 actions.add('MobileToolbarForward') | 306 actions.add('MobileToolbarForward') |
| 307 actions.add('MobileToolbarNewTab') | 307 actions.add('MobileToolbarNewTab') |
| 308 actions.add('MobileToolbarReload') | 308 actions.add('MobileToolbarReload') |
| 309 actions.add('MobileToolbarShowMenu') | 309 actions.add('MobileToolbarShowMenu') |
| 310 actions.add('MobileToolbarShowStackView') | 310 actions.add('MobileToolbarShowStackView') |
| 311 actions.add('MobileToolbarStackViewNewTab') | 311 actions.add('MobileToolbarStackViewNewTab') |
| 312 actions.add('MobileToolbarToggleBookmark') | 312 actions.add('MobileToolbarToggleBookmark') |
| 313 actions.add('MobileUsingMenuByHwButtonDragging') | |
| 314 actions.add('MobileUsingMenuByHwButtonTap') | 313 actions.add('MobileUsingMenuByHwButtonTap') |
| 315 actions.add('MobileUsingMenuBySwButtonDragging') | 314 actions.add('MobileUsingMenuBySwButtonDragging') |
| 316 actions.add('MobileUsingMenuBySwButtonTap') | 315 actions.add('MobileUsingMenuBySwButtonTap') |
| 317 actions.add('SystemBack') | 316 actions.add('SystemBack') |
| 318 actions.add('SystemBackForNavigation') | 317 actions.add('SystemBackForNavigation') |
| 319 | 318 |
| 320 def AddAboutFlagsActions(actions): | 319 def AddAboutFlagsActions(actions): |
| 321 """This parses the experimental feature flags for UMA actions. | 320 """This parses the experimental feature flags for UMA actions. |
| 322 | 321 |
| 323 Arguments: | 322 Arguments: |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 823 |
| 825 with open(actions_xml_path, 'wb') as f: | 824 with open(actions_xml_path, 'wb') as f: |
| 826 f.write(pretty) | 825 f.write(pretty) |
| 827 print ('Updated %s. Don\'t forget to add it to your changelist' % | 826 print ('Updated %s. Don\'t forget to add it to your changelist' % |
| 828 actions_xml_path) | 827 actions_xml_path) |
| 829 return 0 | 828 return 0 |
| 830 | 829 |
| 831 | 830 |
| 832 if '__main__' == __name__: | 831 if '__main__' == __name__: |
| 833 sys.exit(main(sys.argv)) | 832 sys.exit(main(sys.argv)) |
| OLD | NEW |