| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 def AddChromeOSActions(actions): | 275 def AddChromeOSActions(actions): |
| 276 """Add actions reported by non-Chrome processes in Chrome OS. | 276 """Add actions reported by non-Chrome processes in Chrome OS. |
| 277 | 277 |
| 278 Arguments: | 278 Arguments: |
| 279 actions: set of actions to add to. | 279 actions: set of actions to add to. |
| 280 """ | 280 """ |
| 281 # Actions sent by Chrome OS update engine. | 281 # Actions sent by Chrome OS update engine. |
| 282 actions.add('Updater.ServerCertificateChanged') | 282 actions.add('Updater.ServerCertificateChanged') |
| 283 actions.add('Updater.ServerCertificateFailed') | 283 actions.add('Updater.ServerCertificateFailed') |
| 284 | 284 |
| 285 # Actions sent by Chrome OS cryptohome. | |
| 286 actions.add('Cryptohome.PKCS11InitFail') | |
| 287 | |
| 288 def AddExtensionActions(actions): | 285 def AddExtensionActions(actions): |
| 289 """Add actions reported by extensions via chrome.metricsPrivate API. | 286 """Add actions reported by extensions via chrome.metricsPrivate API. |
| 290 | 287 |
| 291 Arguments: | 288 Arguments: |
| 292 actions: set of actions to add to. | 289 actions: set of actions to add to. |
| 293 """ | 290 """ |
| 294 # Actions sent by Chrome OS File Browser. | 291 # Actions sent by Chrome OS File Browser. |
| 295 actions.add('FileBrowser.CreateNewFolder') | 292 actions.add('FileBrowser.CreateNewFolder') |
| 296 actions.add('FileBrowser.PhotoEditor.Edit') | 293 actions.add('FileBrowser.PhotoEditor.Edit') |
| 297 actions.add('FileBrowser.PhotoEditor.View') | 294 actions.add('FileBrowser.PhotoEditor.View') |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 | 732 |
| 736 return PrettyPrint(actions, actions_dict, comment_nodes) | 733 return PrettyPrint(actions, actions_dict, comment_nodes) |
| 737 | 734 |
| 738 | 735 |
| 739 def main(argv): | 736 def main(argv): |
| 740 presubmit_util.DoPresubmitMain(argv, 'actions.xml', 'actions.old.xml', | 737 presubmit_util.DoPresubmitMain(argv, 'actions.xml', 'actions.old.xml', |
| 741 'extract_actions.py', UpdateXml) | 738 'extract_actions.py', UpdateXml) |
| 742 | 739 |
| 743 if '__main__' == __name__: | 740 if '__main__' == __name__: |
| 744 sys.exit(main(sys.argv)) | 741 sys.exit(main(sys.argv)) |
| OLD | NEW |