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

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

Issue 27301002: [Files.app] Record metrics in the suggest apps dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/chromeactions.txt ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 def AddExtensionActions(actions): 356 def AddExtensionActions(actions):
357 """Add actions reported by extensions via chrome.metricsPrivate API. 357 """Add actions reported by extensions via chrome.metricsPrivate API.
358 358
359 Arguments: 359 Arguments:
360 actions: set of actions to add to. 360 actions: set of actions to add to.
361 """ 361 """
362 # Actions sent by Chrome OS File Browser. 362 # Actions sent by Chrome OS File Browser.
363 actions.add('FileBrowser.CreateNewFolder') 363 actions.add('FileBrowser.CreateNewFolder')
364 actions.add('FileBrowser.PhotoEditor.Edit') 364 actions.add('FileBrowser.PhotoEditor.Edit')
365 actions.add('FileBrowser.PhotoEditor.View') 365 actions.add('FileBrowser.PhotoEditor.View')
366 actions.add('FileBrowser.SuggestApps.ShowDialog')
366 367
367 # Actions sent by Google Now client. 368 # Actions sent by Google Now client.
368 actions.add('GoogleNow.MessageClicked') 369 actions.add('GoogleNow.MessageClicked')
369 actions.add('GoogleNow.ButtonClicked0') 370 actions.add('GoogleNow.ButtonClicked0')
370 actions.add('GoogleNow.ButtonClicked1') 371 actions.add('GoogleNow.ButtonClicked1')
371 actions.add('GoogleNow.Dismissed') 372 actions.add('GoogleNow.Dismissed')
372 373
373 def GrepForActions(path, actions): 374 def GrepForActions(path, actions):
374 """Grep a source file for calls to UserMetrics functions. 375 """Grep a source file for calls to UserMetrics functions.
375 376
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 else: 613 else:
613 print action 614 print action
614 615
615 if hash_output: 616 if hash_output:
616 print "Done. Do not forget to add chromeactions.txt to your changelist" 617 print "Done. Do not forget to add chromeactions.txt to your changelist"
617 return 0 618 return 0
618 619
619 620
620 if '__main__' == __name__: 621 if '__main__' == __name__:
621 sys.exit(main(sys.argv)) 622 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « tools/metrics/actions/chromeactions.txt ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698