| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 actions.add('LanguageOptions_UiLanguageChange_%s' % language_code) | 195 actions.add('LanguageOptions_UiLanguageChange_%s' % language_code) |
| 196 actions.add('LanguageOptions_SpellCheckLanguageChange_%s' % language_code) | 196 actions.add('LanguageOptions_SpellCheckLanguageChange_%s' % language_code) |
| 197 | 197 |
| 198 | 198 |
| 199 def AddPDFPluginActions(actions): | 199 def AddPDFPluginActions(actions): |
| 200 """Add actions that are sent by the PDF plugin. | 200 """Add actions that are sent by the PDF plugin. |
| 201 | 201 |
| 202 Arguments | 202 Arguments |
| 203 actions: set of actions to add to. | 203 actions: set of actions to add to. |
| 204 """ | 204 """ |
| 205 actions.add('PDF.FontSubstituted') |
| 205 actions.add('PDF.LoadFailure') | 206 actions.add('PDF.LoadFailure') |
| 206 actions.add('PDF.LoadSuccess') | 207 actions.add('PDF.LoadSuccess') |
| 207 actions.add('PDF.PreviewDocumentLoadFailure') | 208 actions.add('PDF.PreviewDocumentLoadFailure') |
| 208 actions.add('PDF.PrintPage') | 209 actions.add('PDF.PrintPage') |
| 209 actions.add('PDF.ZoomFromBrowser') | 210 actions.add('PDF.ZoomFromBrowser') |
| 210 actions.add('PDF_Unsupported_3D') | 211 actions.add('PDF_Unsupported_3D') |
| 211 actions.add('PDF_Unsupported_Attachment') | 212 actions.add('PDF_Unsupported_Attachment') |
| 212 actions.add('PDF_Unsupported_Bookmarks') | 213 actions.add('PDF_Unsupported_Bookmarks') |
| 213 actions.add('PDF_Unsupported_Digital_Signature') | 214 actions.add('PDF_Unsupported_Digital_Signature') |
| 214 actions.add('PDF_Unsupported_Movie') | 215 actions.add('PDF_Unsupported_Movie') |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 | 737 |
| 737 return PrettyPrint(actions, actions_dict, comment_nodes) | 738 return PrettyPrint(actions, actions_dict, comment_nodes) |
| 738 | 739 |
| 739 | 740 |
| 740 def main(argv): | 741 def main(argv): |
| 741 presubmit_util.DoPresubmitMain(argv, 'actions.xml', 'actions.old.xml', | 742 presubmit_util.DoPresubmitMain(argv, 'actions.xml', 'actions.old.xml', |
| 742 'extract_actions.py', UpdateXml) | 743 'extract_actions.py', UpdateXml) |
| 743 | 744 |
| 744 if '__main__' == __name__: | 745 if '__main__' == __name__: |
| 745 sys.exit(main(sys.argv)) | 746 sys.exit(main(sys.argv)) |
| OLD | NEW |