Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Side by Side Diff: tools/metrics/actions/extract_actions.py

Issue 179873004: remove support for InputMethodOptions_Open_* which hasn't been used for a while and is now removed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge actions.xml change Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/metrics/actions/actions.xml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 # Actions for safe_browsing_blocking_page.cc. 155 # Actions for safe_browsing_blocking_page.cc.
156 for interstitial in ('Phishing', 'Malware', 'Multiple'): 156 for interstitial in ('Phishing', 'Malware', 'Multiple'):
157 for action in ('Show', 'Proceed', 'DontProceed', 'ForcedDontProceed'): 157 for action in ('Show', 'Proceed', 'DontProceed', 'ForcedDontProceed'):
158 actions.add('SBInterstitial%s%s' % (interstitial, action)) 158 actions.add('SBInterstitial%s%s' % (interstitial, action))
159 159
160 # Actions for language_options_handler.cc (Chrome OS specific). 160 # Actions for language_options_handler.cc (Chrome OS specific).
161 for input_method_id in INPUT_METHOD_IDS: 161 for input_method_id in INPUT_METHOD_IDS:
162 actions.add('LanguageOptions_DisableInputMethod_%s' % input_method_id) 162 actions.add('LanguageOptions_DisableInputMethod_%s' % input_method_id)
163 actions.add('LanguageOptions_EnableInputMethod_%s' % input_method_id) 163 actions.add('LanguageOptions_EnableInputMethod_%s' % input_method_id)
164 actions.add('InputMethodOptions_Open_%s' % input_method_id)
165 for language_code in LANGUAGE_CODES: 164 for language_code in LANGUAGE_CODES:
166 actions.add('LanguageOptions_UiLanguageChange_%s' % language_code) 165 actions.add('LanguageOptions_UiLanguageChange_%s' % language_code)
167 actions.add('LanguageOptions_SpellCheckLanguageChange_%s' % language_code) 166 actions.add('LanguageOptions_SpellCheckLanguageChange_%s' % language_code)
168 167
169 def AddWebKitEditorActions(actions): 168 def AddWebKitEditorActions(actions):
170 """Add editor actions from editor_client_impl.cc. 169 """Add editor actions from editor_client_impl.cc.
171 170
172 Arguments: 171 Arguments:
173 actions: set of actions to add to. 172 actions: set of actions to add to.
174 """ 173 """
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 821
823 with open(actions_xml_path, 'wb') as f: 822 with open(actions_xml_path, 'wb') as f:
824 f.write(pretty) 823 f.write(pretty)
825 print ('Updated %s. Don\'t forget to add it to your changelist' % 824 print ('Updated %s. Don\'t forget to add it to your changelist' %
826 actions_xml_path) 825 actions_xml_path)
827 return 0 826 return 0
828 827
829 828
830 if '__main__' == __name__: 829 if '__main__' == __name__:
831 sys.exit(main(sys.argv)) 830 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « tools/metrics/actions/actions.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698