| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 actions.add('DataReductionProxy_TurnedOff'); | 216 actions.add('DataReductionProxy_TurnedOff'); |
| 217 actions.add('MobileActionBarShown') | 217 actions.add('MobileActionBarShown') |
| 218 actions.add('MobileBeamCallbackSuccess') | 218 actions.add('MobileBeamCallbackSuccess') |
| 219 actions.add('MobileBeamInvalidAppState') | 219 actions.add('MobileBeamInvalidAppState') |
| 220 actions.add('MobileBreakpadUploadAttempt') | 220 actions.add('MobileBreakpadUploadAttempt') |
| 221 actions.add('MobileBreakpadUploadFailure') | 221 actions.add('MobileBreakpadUploadFailure') |
| 222 actions.add('MobileBreakpadUploadSuccess') | 222 actions.add('MobileBreakpadUploadSuccess') |
| 223 actions.add('MobileContextMenuCopyImageLinkAddress') | 223 actions.add('MobileContextMenuCopyImageLinkAddress') |
| 224 actions.add('MobileContextMenuCopyLinkAddress') | 224 actions.add('MobileContextMenuCopyLinkAddress') |
| 225 actions.add('MobileContextMenuCopyLinkText') | 225 actions.add('MobileContextMenuCopyLinkText') |
| 226 actions.add('MobileContextMenuDownloadImage') |
| 227 actions.add('MobileContextMenuDownloadLink') |
| 228 actions.add('MobileContextMenuDownloadVideo') |
| 226 actions.add('MobileContextMenuImage') | 229 actions.add('MobileContextMenuImage') |
| 227 actions.add('MobileContextMenuLink') | 230 actions.add('MobileContextMenuLink') |
| 228 actions.add('MobileContextMenuOpenImageInNewTab') | 231 actions.add('MobileContextMenuOpenImageInNewTab') |
| 229 actions.add('MobileContextMenuOpenLink') | 232 actions.add('MobileContextMenuOpenLink') |
| 230 actions.add('MobileContextMenuOpenLinkInIncognito') | 233 actions.add('MobileContextMenuOpenLinkInIncognito') |
| 231 actions.add('MobileContextMenuOpenLinkInNewTab') | 234 actions.add('MobileContextMenuOpenLinkInNewTab') |
| 232 actions.add('MobileContextMenuSaveImage') | 235 actions.add('MobileContextMenuSaveImage') |
| 233 actions.add('MobileContextMenuSearchByImage') | 236 actions.add('MobileContextMenuSearchByImage') |
| 234 actions.add('MobileContextMenuShareLink') | 237 actions.add('MobileContextMenuShareLink') |
| 235 actions.add('MobileContextMenuText') | 238 actions.add('MobileContextMenuText') |
| 239 actions.add('MobileContextMenuVideo') |
| 236 actions.add('MobileContextMenuViewImage') | 240 actions.add('MobileContextMenuViewImage') |
| 237 actions.add('MobileFocusedFakeboxOnNtp') | 241 actions.add('MobileFocusedFakeboxOnNtp') |
| 238 actions.add('MobileFocusedOmniboxNotOnNtp') | 242 actions.add('MobileFocusedOmniboxNotOnNtp') |
| 239 actions.add('MobileFocusedOmniboxOnNtp') | 243 actions.add('MobileFocusedOmniboxOnNtp') |
| 240 actions.add('MobileFreAttemptSignIn') | 244 actions.add('MobileFreAttemptSignIn') |
| 241 actions.add('MobileFreSignInSuccessful') | 245 actions.add('MobileFreSignInSuccessful') |
| 242 actions.add('MobileFreSkipSignIn') | 246 actions.add('MobileFreSkipSignIn') |
| 243 actions.add('MobileMenuAddToBookmarks') | 247 actions.add('MobileMenuAddToBookmarks') |
| 244 actions.add('MobileMenuAllBookmarks') | 248 actions.add('MobileMenuAllBookmarks') |
| 245 actions.add('MobileMenuBack') | 249 actions.add('MobileMenuBack') |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 else: | 602 else: |
| 599 print action | 603 print action |
| 600 | 604 |
| 601 if hash_output: | 605 if hash_output: |
| 602 print "Done. Do not forget to add chromeactions.txt to your changelist" | 606 print "Done. Do not forget to add chromeactions.txt to your changelist" |
| 603 return 0 | 607 return 0 |
| 604 | 608 |
| 605 | 609 |
| 606 if '__main__' == __name__: | 610 if '__main__' == __name__: |
| 607 sys.exit(main(sys.argv)) | 611 sys.exit(main(sys.argv)) |
| OLD | NEW |