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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 actions.add('ConnectivityDiagnostics.LaunchSource.WebStore') | 308 actions.add('ConnectivityDiagnostics.LaunchSource.WebStore') |
309 actions.add('ConnectivityDiagnostics.UA.LogsShown') | 309 actions.add('ConnectivityDiagnostics.UA.LogsShown') |
310 actions.add('ConnectivityDiagnostics.UA.PassingTestsShown') | 310 actions.add('ConnectivityDiagnostics.UA.PassingTestsShown') |
311 actions.add('ConnectivityDiagnostics.UA.SettingsShown') | 311 actions.add('ConnectivityDiagnostics.UA.SettingsShown') |
312 actions.add('ConnectivityDiagnostics.UA.TestResultExpanded') | 312 actions.add('ConnectivityDiagnostics.UA.TestResultExpanded') |
313 actions.add('ConnectivityDiagnostics.UA.TestSuiteRun') | 313 actions.add('ConnectivityDiagnostics.UA.TestSuiteRun') |
314 | 314 |
315 # Actions sent by 'Ok Google' Hotwording. | 315 # Actions sent by 'Ok Google' Hotwording. |
316 actions.add('Hotword.HotwordTrigger') | 316 actions.add('Hotword.HotwordTrigger') |
317 | 317 |
| 318 # Actions sent by the Chrome Remote Desktop extension. |
| 319 actions.add('Chromoting.Connections.Authenticated') |
| 320 actions.add('Chromoting.Connections.Closed') |
| 321 actions.add('Chromoting.Connections.Connected') |
| 322 actions.add('Chromoting.Connections.Connecting') |
| 323 actions.add('Chromoting.Connections.Dropped') |
| 324 |
318 | 325 |
319 class InvalidStatementException(Exception): | 326 class InvalidStatementException(Exception): |
320 """Indicates an invalid statement was found.""" | 327 """Indicates an invalid statement was found.""" |
321 | 328 |
322 | 329 |
323 class ActionNameFinder: | 330 class ActionNameFinder: |
324 """Helper class to find action names in source code file.""" | 331 """Helper class to find action names in source code file.""" |
325 | 332 |
326 def __init__(self, path, contents): | 333 def __init__(self, path, contents): |
327 self.__path = path | 334 self.__path = path |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 | 753 |
747 return PrettyPrint(actions, actions_dict, comment_nodes) | 754 return PrettyPrint(actions, actions_dict, comment_nodes) |
748 | 755 |
749 | 756 |
750 def main(argv): | 757 def main(argv): |
751 presubmit_util.DoPresubmitMain(argv, 'actions.xml', 'actions.old.xml', | 758 presubmit_util.DoPresubmitMain(argv, 'actions.xml', 'actions.old.xml', |
752 'extract_actions.py', UpdateXml) | 759 'extract_actions.py', UpdateXml) |
753 | 760 |
754 if '__main__' == __name__: | 761 if '__main__' == __name__: |
755 sys.exit(main(sys.argv)) | 762 sys.exit(main(sys.argv)) |
OLD | NEW |