| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 actions.add('PDF_Unsupported_Shared_Review') | 199 actions.add('PDF_Unsupported_Shared_Review') |
| 200 actions.add('PDF_Unsupported_Sound') | 200 actions.add('PDF_Unsupported_Sound') |
| 201 actions.add('PDF_Unsupported_XFA') | 201 actions.add('PDF_Unsupported_XFA') |
| 202 | 202 |
| 203 def AddAndroidActions(actions): | 203 def AddAndroidActions(actions): |
| 204 """Add actions that are used by Chrome on Android. | 204 """Add actions that are used by Chrome on Android. |
| 205 | 205 |
| 206 Arguments | 206 Arguments |
| 207 actions: set of actions to add to. | 207 actions: set of actions to add to. |
| 208 """ | 208 """ |
| 209 actions.add('Cast_Sender_CastDeviceSelected'); |
| 209 actions.add('Cast_Sender_CastEnterFullscreen'); | 210 actions.add('Cast_Sender_CastEnterFullscreen'); |
| 210 actions.add('Cast_Sender_CastDeviceSelected'); | 211 actions.add('Cast_Sender_CastMediaType'); |
| 212 actions.add('Cast_Sender_CastPlayRequested'); |
| 211 actions.add('Cast_Sender_YouTubeDeviceSelected'); | 213 actions.add('Cast_Sender_YouTubeDeviceSelected'); |
| 212 actions.add('Cast_Sender_CastPlayRequested'); | |
| 213 actions.add('DataReductionProxy_PromoDisplayed'); | 214 actions.add('DataReductionProxy_PromoDisplayed'); |
| 214 actions.add('DataReductionProxy_PromoLearnMore'); | 215 actions.add('DataReductionProxy_PromoLearnMore'); |
| 215 actions.add('DataReductionProxy_TurnedOn'); | 216 actions.add('DataReductionProxy_TurnedOn'); |
| 216 actions.add('DataReductionProxy_TurnedOnFromPromo'); | 217 actions.add('DataReductionProxy_TurnedOnFromPromo'); |
| 217 actions.add('DataReductionProxy_TurnedOff'); | 218 actions.add('DataReductionProxy_TurnedOff'); |
| 218 actions.add('MobileActionBarShown') | 219 actions.add('MobileActionBarShown') |
| 219 actions.add('MobileBeamCallbackSuccess') | 220 actions.add('MobileBeamCallbackSuccess') |
| 220 actions.add('MobileBeamInvalidAppState') | 221 actions.add('MobileBeamInvalidAppState') |
| 221 actions.add('MobileBreakpadUploadAttempt') | 222 actions.add('MobileBreakpadUploadAttempt') |
| 222 actions.add('MobileBreakpadUploadFailure') | 223 actions.add('MobileBreakpadUploadFailure') |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 else: | 629 else: |
| 629 print action | 630 print action |
| 630 | 631 |
| 631 if hash_output: | 632 if hash_output: |
| 632 print "Done. Do not forget to add chromeactions.txt to your changelist" | 633 print "Done. Do not forget to add chromeactions.txt to your changelist" |
| 633 return 0 | 634 return 0 |
| 634 | 635 |
| 635 | 636 |
| 636 if '__main__' == __name__: | 637 if '__main__' == __name__: |
| 637 sys.exit(main(sys.argv)) | 638 sys.exit(main(sys.argv)) |
| OLD | NEW |