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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 actions: set of actions to add to. | 165 actions: set of actions to add to. |
166 """ | 166 """ |
167 actions.add('PDF.PrintPage') | 167 actions.add('PDF.PrintPage') |
168 actions.add('PDF.FitToHeightButton') | 168 actions.add('PDF.FitToHeightButton') |
169 actions.add('PDF.FitToWidthButton') | 169 actions.add('PDF.FitToWidthButton') |
170 actions.add('PDF.LoadFailure') | 170 actions.add('PDF.LoadFailure') |
171 actions.add('PDF.LoadSuccess') | 171 actions.add('PDF.LoadSuccess') |
172 actions.add('PDF.ZoomFromBrowser') | 172 actions.add('PDF.ZoomFromBrowser') |
173 actions.add('PDF.ZoomOutButton') | 173 actions.add('PDF.ZoomOutButton') |
174 actions.add('PDF.ZoomInButton') | 174 actions.add('PDF.ZoomInButton') |
| 175 actions.add('PDF_Unsupported_Rights_Management') |
| 176 actions.add('PDF_Unsupported_XFA') |
| 177 actions.add('PDF_Unsupported_3D') |
| 178 actions.add('PDF_Unsupported_Movie') |
| 179 actions.add('PDF_Unsupported_Sound') |
| 180 actions.add('PDF_Unsupported_Screen') |
| 181 actions.add('PDF_Unsupported_Portfolios') |
| 182 actions.add('PDF_Unsupported_Attachments') |
| 183 actions.add('PDF_Unsupported_Digital_Signatures') |
| 184 actions.add('PDF_Unsupported_Shared_Review') |
| 185 actions.add('PDF_Unsupported_Shared_Form') |
175 | 186 |
176 def AddAboutFlagsActions(actions): | 187 def AddAboutFlagsActions(actions): |
177 """This parses the experimental feature flags for UMA actions. | 188 """This parses the experimental feature flags for UMA actions. |
178 | 189 |
179 Arguments: | 190 Arguments: |
180 actions: set of actions to add to. | 191 actions: set of actions to add to. |
181 """ | 192 """ |
182 about_flags = os.path.join(path_utils.ScriptDir(), '..', 'browser', | 193 about_flags = os.path.join(path_utils.ScriptDir(), '..', 'browser', |
183 'about_flags.cc') | 194 'about_flags.cc') |
184 flag_name_re = re.compile(r'\s*"([0-9a-zA-Z\-_]+)",\s*// FLAGS:RECORD_UMA') | 195 flag_name_re = re.compile(r'\s*"([0-9a-zA-Z\-_]+)",\s*// FLAGS:RECORD_UMA') |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 hash.update(action) | 287 hash.update(action) |
277 print >>f, '0x%s\t%s' % (hash.hexdigest()[:16], action) | 288 print >>f, '0x%s\t%s' % (hash.hexdigest()[:16], action) |
278 else: | 289 else: |
279 print action | 290 print action |
280 | 291 |
281 if hash_output: | 292 if hash_output: |
282 print "Done. Do not forget to add chromeactions.txt to your changelist" | 293 print "Done. Do not forget to add chromeactions.txt to your changelist" |
283 | 294 |
284 if '__main__' == __name__: | 295 if '__main__' == __name__: |
285 main(sys.argv) | 296 main(sys.argv) |
OLD | NEW |