| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 """Add actions that are used by Chrome on Android. | 197 """Add actions that are used by Chrome on Android. |
| 198 | 198 |
| 199 Arguments | 199 Arguments |
| 200 actions: set of actions to add to. | 200 actions: set of actions to add to. |
| 201 """ | 201 """ |
| 202 actions.add('DataReductionProxy_PromoDisplayed'); | 202 actions.add('DataReductionProxy_PromoDisplayed'); |
| 203 actions.add('DataReductionProxy_PromoLearnMore'); | 203 actions.add('DataReductionProxy_PromoLearnMore'); |
| 204 actions.add('DataReductionProxy_TurnedOn'); | 204 actions.add('DataReductionProxy_TurnedOn'); |
| 205 actions.add('DataReductionProxy_TurnedOnFromPromo'); | 205 actions.add('DataReductionProxy_TurnedOnFromPromo'); |
| 206 actions.add('DataReductionProxy_TurnedOff'); | 206 actions.add('DataReductionProxy_TurnedOff'); |
| 207 actions.add('MobileActionBarShown') |
| 207 actions.add('MobileBeamCallbackSuccess') | 208 actions.add('MobileBeamCallbackSuccess') |
| 208 actions.add('MobileBeamInvalidAppState') | 209 actions.add('MobileBeamInvalidAppState') |
| 209 actions.add('MobileBreakpadUploadAttempt') | 210 actions.add('MobileBreakpadUploadAttempt') |
| 210 actions.add('MobileBreakpadUploadFailure') | 211 actions.add('MobileBreakpadUploadFailure') |
| 211 actions.add('MobileBreakpadUploadSuccess') | 212 actions.add('MobileBreakpadUploadSuccess') |
| 212 actions.add('MobileContextMenuCopyImageLinkAddress') | 213 actions.add('MobileContextMenuCopyImageLinkAddress') |
| 213 actions.add('MobileContextMenuCopyLinkAddress') | 214 actions.add('MobileContextMenuCopyLinkAddress') |
| 214 actions.add('MobileContextMenuCopyLinkText') | 215 actions.add('MobileContextMenuCopyLinkText') |
| 215 actions.add('MobileContextMenuImage') | 216 actions.add('MobileContextMenuImage') |
| 216 actions.add('MobileContextMenuLink') | 217 actions.add('MobileContextMenuLink') |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 else: | 609 else: |
| 609 print action | 610 print action |
| 610 | 611 |
| 611 if hash_output: | 612 if hash_output: |
| 612 print "Done. Do not forget to add chromeactions.txt to your changelist" | 613 print "Done. Do not forget to add chromeactions.txt to your changelist" |
| 613 return 0 | 614 return 0 |
| 614 | 615 |
| 615 | 616 |
| 616 if '__main__' == __name__: | 617 if '__main__' == __name__: |
| 617 sys.exit(main(sys.argv)) | 618 sys.exit(main(sys.argv)) |
| OLD | NEW |