| 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 UMA histogram strings from the Chrome source. | 6 """Extract UMA histogram strings from the Chrome source. |
| 5 | 7 |
| 6 This program generates the list of known histograms we expect to see in | 8 This program generates the list of known histograms we expect to see in |
| 7 the user behavior logs. It walks the Chrome source, looking for calls | 9 the user behavior logs. It walks the Chrome source, looking for calls |
| 8 to UMA histogram macros. | 10 to UMA histogram macros. |
| 9 | 11 |
| 10 Run it from the chrome/browser directory like: | 12 Run it from the chrome/browser directory like: |
| 11 extract_histograms.py > histogram_list | 13 extract_histograms.py > histogram_list |
| 12 """ | 14 """ |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 49 |
| 48 # Walk the source tree to process all .cc files. | 50 # Walk the source tree to process all .cc files. |
| 49 WalkDirectory('..', histograms) | 51 WalkDirectory('..', histograms) |
| 50 | 52 |
| 51 # Print out the histograms as a sorted list. | 53 # Print out the histograms as a sorted list. |
| 52 for histogram in sorted(histograms): | 54 for histogram in sorted(histograms): |
| 53 print histogram | 55 print histogram |
| 54 | 56 |
| 55 if '__main__' == __name__: | 57 if '__main__' == __name__: |
| 56 main(sys.argv) | 58 main(sys.argv) |
| OLD | NEW |