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

Side by Side Diff: chrome/tools/extract_actions.py

Issue 10694037: Add a policy to disable proceeding through the Safe Browsing interstitials. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed self-closing <img> tags Created 8 years, 5 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
« no previous file with comments | « chrome/tools/chromeactions.txt ('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 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Extract UserMetrics "actions" strings from the Chrome source. 6 """Extract UserMetrics "actions" strings from the Chrome source.
7 7
8 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
9 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
10 UserMetrics functions, extracting actions and warning on improper calls, 10 UserMetrics functions, extracting actions and warning on improper calls,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 for i in range(1, 20): 119 for i in range(1, 20):
120 actions.add(dir + 'HistoryClick' + str(i)) 120 actions.add(dir + 'HistoryClick' + str(i))
121 actions.add(dir + 'ChapterClick' + str(i)) 121 actions.add(dir + 'ChapterClick' + str(i))
122 122
123 # Actions for new_tab_ui.cc. 123 # Actions for new_tab_ui.cc.
124 for i in range(1, 10): 124 for i in range(1, 10):
125 actions.add('MostVisited%d' % i) 125 actions.add('MostVisited%d' % i)
126 126
127 # Actions for safe_browsing_blocking_page.cc. 127 # Actions for safe_browsing_blocking_page.cc.
128 for interstitial in ('Phishing', 'Malware', 'Multiple'): 128 for interstitial in ('Phishing', 'Malware', 'Multiple'):
129 for action in ('Show', 'Proceed', 'DontProceed'): 129 for action in ('Show', 'Proceed', 'DontProceed', 'ForcedDontProceed'):
130 actions.add('SBInterstitial%s%s' % (interstitial, action)) 130 actions.add('SBInterstitial%s%s' % (interstitial, action))
131 131
132 # Actions for language_options_handler.cc (Chrome OS specific). 132 # Actions for language_options_handler.cc (Chrome OS specific).
133 for input_method_id in INPUT_METHOD_IDS: 133 for input_method_id in INPUT_METHOD_IDS:
134 actions.add('LanguageOptions_DisableInputMethod_%s' % input_method_id) 134 actions.add('LanguageOptions_DisableInputMethod_%s' % input_method_id)
135 actions.add('LanguageOptions_EnableInputMethod_%s' % input_method_id) 135 actions.add('LanguageOptions_EnableInputMethod_%s' % input_method_id)
136 actions.add('InputMethodOptions_Open_%s' % input_method_id) 136 actions.add('InputMethodOptions_Open_%s' % input_method_id)
137 for language_code in LANGUAGE_CODES: 137 for language_code in LANGUAGE_CODES:
138 actions.add('LanguageOptions_UiLanguageChange_%s' % language_code) 138 actions.add('LanguageOptions_UiLanguageChange_%s' % language_code)
139 actions.add('LanguageOptions_SpellCheckLanguageChange_%s' % language_code) 139 actions.add('LanguageOptions_SpellCheckLanguageChange_%s' % language_code)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 else: 446 else:
447 print action 447 print action
448 448
449 if hash_output: 449 if hash_output:
450 print "Done. Do not forget to add chromeactions.txt to your changelist" 450 print "Done. Do not forget to add chromeactions.txt to your changelist"
451 return 0 451 return 0
452 452
453 453
454 if '__main__' == __name__: 454 if '__main__' == __name__:
455 sys.exit(main(sys.argv)) 455 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « chrome/tools/chromeactions.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698