| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2007 Google Inc. All rights reserved. | 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 3 | 5 |
| 4 """Extract UserMetrics "actions" strings from the Chrome source. | 6 """Extract UserMetrics "actions" strings from the Chrome source. |
| 5 | 7 |
| 6 This program generates the list of known actions we expect to see in the | 8 This program generates the list of known actions we expect to see in the |
| 7 user behavior logs. It walks the Chrome source, looking for calls to | 9 user behavior logs. It walks the Chrome source, looking for calls to |
| 8 UserMetrics functions, extracting actions and warning on improper calls, | 10 UserMetrics functions, extracting actions and warning on improper calls, |
| 9 as well as generating the lists of possible actions in situations where | 11 as well as generating the lists of possible actions in situations where |
| 10 there are many possible actions. | 12 there are many possible actions. |
| 11 | 13 |
| 12 See also: | 14 See also: |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 webkit_root = os.path.join(path_utils.ScriptDir(), '..', '..', 'webkit') | 117 webkit_root = os.path.join(path_utils.ScriptDir(), '..', '..', 'webkit') |
| 116 WalkDirectory(os.path.join(webkit_root, 'glue'), actions) | 118 WalkDirectory(os.path.join(webkit_root, 'glue'), actions) |
| 117 WalkDirectory(os.path.join(webkit_root, 'port'), actions) | 119 WalkDirectory(os.path.join(webkit_root, 'port'), actions) |
| 118 | 120 |
| 119 # Print out the actions as a sorted list. | 121 # Print out the actions as a sorted list. |
| 120 for action in sorted(actions): | 122 for action in sorted(actions): |
| 121 print action | 123 print action |
| 122 | 124 |
| 123 if '__main__' == __name__: | 125 if '__main__' == __name__: |
| 124 main(sys.argv) | 126 main(sys.argv) |
| OLD | NEW |