| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 actions.add('MobileNTPSwitchToIncognito') | 280 actions.add('MobileNTPSwitchToIncognito') |
| 281 actions.add('MobileNTPSwitchToMostVisited') | 281 actions.add('MobileNTPSwitchToMostVisited') |
| 282 actions.add('MobileNTPSwitchToOpenTabs') | 282 actions.add('MobileNTPSwitchToOpenTabs') |
| 283 actions.add('MobileNewTabOpened') | 283 actions.add('MobileNewTabOpened') |
| 284 actions.add('MobileOmniboxSearch') | 284 actions.add('MobileOmniboxSearch') |
| 285 actions.add('MobileOmniboxVoiceSearch') | 285 actions.add('MobileOmniboxVoiceSearch') |
| 286 actions.add('MobileOmniboxRefineSuggestion') | 286 actions.add('MobileOmniboxRefineSuggestion') |
| 287 actions.add('MobilePageLoaded') | 287 actions.add('MobilePageLoaded') |
| 288 actions.add('MobilePageLoadedDesktopUserAgent') | 288 actions.add('MobilePageLoadedDesktopUserAgent') |
| 289 actions.add('MobilePageLoadedWithKeyboard') | 289 actions.add('MobilePageLoadedWithKeyboard') |
| 290 actions.add('MobilePullGestureReload') |
| 290 actions.add('MobileReceivedExternalIntent') | 291 actions.add('MobileReceivedExternalIntent') |
| 291 actions.add('MobileRendererCrashed') | 292 actions.add('MobileRendererCrashed') |
| 292 actions.add('MobileShortcutAllBookmarks') | 293 actions.add('MobileShortcutAllBookmarks') |
| 293 actions.add('MobileShortcutFindInPage') | 294 actions.add('MobileShortcutFindInPage') |
| 294 actions.add('MobileShortcutNewIncognitoTab') | 295 actions.add('MobileShortcutNewIncognitoTab') |
| 295 actions.add('MobileShortcutNewTab') | 296 actions.add('MobileShortcutNewTab') |
| 296 actions.add('MobileSideSwipeFinished') | 297 actions.add('MobileSideSwipeFinished') |
| 297 actions.add('MobileStackViewCloseTab') | 298 actions.add('MobileStackViewCloseTab') |
| 298 actions.add('MobileStackViewSwipeCloseTab') | 299 actions.add('MobileStackViewSwipeCloseTab') |
| 299 actions.add('MobileTabClobbered') | 300 actions.add('MobileTabClobbered') |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 | 814 |
| 814 with open(actions_xml_path, 'wb') as f: | 815 with open(actions_xml_path, 'wb') as f: |
| 815 f.write(pretty) | 816 f.write(pretty) |
| 816 print ('Updated %s. Don\'t forget to add it to your changelist' % | 817 print ('Updated %s. Don\'t forget to add it to your changelist' % |
| 817 actions_xml_path) | 818 actions_xml_path) |
| 818 return 0 | 819 return 0 |
| 819 | 820 |
| 820 | 821 |
| 821 if '__main__' == __name__: | 822 if '__main__' == __name__: |
| 822 sys.exit(main(sys.argv)) | 823 sys.exit(main(sys.argv)) |
| OLD | NEW |