| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 def AddExtensionActions(actions): | 352 def AddExtensionActions(actions): |
| 353 """Add actions reported by extensions via chrome.metricsPrivate API. | 353 """Add actions reported by extensions via chrome.metricsPrivate API. |
| 354 | 354 |
| 355 Arguments: | 355 Arguments: |
| 356 actions: set of actions to add to. | 356 actions: set of actions to add to. |
| 357 """ | 357 """ |
| 358 # Actions sent by Chrome OS File Browser. | 358 # Actions sent by Chrome OS File Browser. |
| 359 actions.add('FileBrowser.CreateNewFolder') | 359 actions.add('FileBrowser.CreateNewFolder') |
| 360 actions.add('FileBrowser.PhotoEditor.Edit') | 360 actions.add('FileBrowser.PhotoEditor.Edit') |
| 361 actions.add('FileBrowser.PhotoEditor.View') | 361 actions.add('FileBrowser.PhotoEditor.View') |
| 362 actions.add('FileBrowser.SuggestApps.ShowDialog') |
| 362 | 363 |
| 363 # Actions sent by Google Now client. | 364 # Actions sent by Google Now client. |
| 364 actions.add('GoogleNow.MessageClicked') | 365 actions.add('GoogleNow.MessageClicked') |
| 365 actions.add('GoogleNow.ButtonClicked0') | 366 actions.add('GoogleNow.ButtonClicked0') |
| 366 actions.add('GoogleNow.ButtonClicked1') | 367 actions.add('GoogleNow.ButtonClicked1') |
| 367 actions.add('GoogleNow.WelcomeToastClickedYes') | 368 actions.add('GoogleNow.WelcomeToastClickedYes') |
| 368 actions.add('GoogleNow.WelcomeToastClickedNo') | 369 actions.add('GoogleNow.WelcomeToastClickedNo') |
| 369 actions.add('GoogleNow.WelcomeToastDismissed') | 370 actions.add('GoogleNow.WelcomeToastDismissed') |
| 370 actions.add('GoogleNow.Dismissed') | 371 actions.add('GoogleNow.Dismissed') |
| 371 | 372 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 else: | 612 else: |
| 612 print action | 613 print action |
| 613 | 614 |
| 614 if hash_output: | 615 if hash_output: |
| 615 print "Done. Do not forget to add chromeactions.txt to your changelist" | 616 print "Done. Do not forget to add chromeactions.txt to your changelist" |
| 616 return 0 | 617 return 0 |
| 617 | 618 |
| 618 | 619 |
| 619 if '__main__' == __name__: | 620 if '__main__' == __name__: |
| 620 sys.exit(main(sys.argv)) | 621 sys.exit(main(sys.argv)) |
| OLD | NEW |