OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 actions.add('PDF.LoadSuccess') | 161 actions.add('PDF.LoadSuccess') |
162 actions.add('PDF.ZoomFromBrowser') | 162 actions.add('PDF.ZoomFromBrowser') |
163 actions.add('PDF.ZoomOutButton') | 163 actions.add('PDF.ZoomOutButton') |
164 actions.add('PDF.ZoomInButton') | 164 actions.add('PDF.ZoomInButton') |
165 actions.add('PDF_Unsupported_Rights_Management') | 165 actions.add('PDF_Unsupported_Rights_Management') |
166 actions.add('PDF_Unsupported_XFA') | 166 actions.add('PDF_Unsupported_XFA') |
167 actions.add('PDF_Unsupported_3D') | 167 actions.add('PDF_Unsupported_3D') |
168 actions.add('PDF_Unsupported_Movie') | 168 actions.add('PDF_Unsupported_Movie') |
169 actions.add('PDF_Unsupported_Sound') | 169 actions.add('PDF_Unsupported_Sound') |
170 actions.add('PDF_Unsupported_Screen') | 170 actions.add('PDF_Unsupported_Screen') |
171 actions.add('PDF_Unsupported_Portfolios') | 171 actions.add('PDF_Unsupported_Portfolios_Packages') |
172 actions.add('PDF_Unsupported_Attachments') | 172 actions.add('PDF_Unsupported_Attachment') |
173 actions.add('PDF_Unsupported_Digital_Signatures') | 173 actions.add('PDF_Unsupported_Digital_Signature') |
174 actions.add('PDF_Unsupported_Shared_Review') | 174 actions.add('PDF_Unsupported_Shared_Review') |
175 actions.add('PDF_Unsupported_Shared_Form') | 175 actions.add('PDF_Unsupported_Shared_Form') |
176 | 176 |
177 def AddAboutFlagsActions(actions): | 177 def AddAboutFlagsActions(actions): |
178 """This parses the experimental feature flags for UMA actions. | 178 """This parses the experimental feature flags for UMA actions. |
179 | 179 |
180 Arguments: | 180 Arguments: |
181 actions: set of actions to add to. | 181 actions: set of actions to add to. |
182 """ | 182 """ |
183 about_flags = os.path.join(path_utils.ScriptDir(), '..', 'browser', | 183 about_flags = os.path.join(path_utils.ScriptDir(), '..', 'browser', |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 hash.update(action) | 294 hash.update(action) |
295 print >>f, '0x%s\t%s' % (hash.hexdigest()[:16], action) | 295 print >>f, '0x%s\t%s' % (hash.hexdigest()[:16], action) |
296 else: | 296 else: |
297 print action | 297 print action |
298 | 298 |
299 if hash_output: | 299 if hash_output: |
300 print "Done. Do not forget to add chromeactions.txt to your changelist" | 300 print "Done. Do not forget to add chromeactions.txt to your changelist" |
301 | 301 |
302 if '__main__' == __name__: | 302 if '__main__' == __name__: |
303 main(sys.argv) | 303 main(sys.argv) |
OLD | NEW |