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

Unified Diff: chrome/tools/extract_actions.py

Issue 6266011: chromeos: Simplify user action code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser
Patch Set: only insert user actions when metrics collection is started Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/tools/extract_actions.py
diff --git a/chrome/tools/extract_actions.py b/chrome/tools/extract_actions.py
index 9027620e5c85bc1a1536cb44eaa7176fc54ff29d..e28c85b2515c27753be5177a60b77a3540973b96 100755
--- a/chrome/tools/extract_actions.py
+++ b/chrome/tools/extract_actions.py
@@ -133,16 +133,6 @@ def AddComputedActions(actions):
actions.add('LanguageOptions_UiLanguageChange_%s' % language_code)
actions.add('LanguageOptions_SpellCheckLanguageChange_%s' % language_code)
- # Actions sent by the Chrome OS window manager.
- actions.add('Accel_NextWindow_Tab')
- actions.add('Accel_PrevWindow_Tab')
- actions.add('Accel_NextWindow_F5')
- actions.add('Accel_PrevWindow_F5')
-
- # Actions sent by the Chrome OS power manager.
- actions.add('Accel_BrightnessDown_F6')
- actions.add('Accel_BrightnessUp_F7')
-
def AddWebKitEditorActions(actions):
"""Add editor actions from editor_client_impl.cc.
@@ -192,6 +182,22 @@ def AddAboutFlagsActions(actions):
print >>sys.stderr, 'WARNING: This line is marked for recording ' + \
'about:flags metrics, but is not in the proper format:\n' + line
+def AddChromeOSActions(actions):
+ """Add actions reported by non-Chrome processes in Chrome OS.
+
+ Arguments:
+ actions: set of actions to add to.
+ """
+ # Actions sent by the Chrome OS window manager.
+ actions.add('Accel_NextWindow_Tab')
+ actions.add('Accel_PrevWindow_Tab')
+ actions.add('Accel_NextWindow_F5')
+ actions.add('Accel_PrevWindow_F5')
+
+ # Actions sent by the Chrome OS power manager.
+ actions.add('Accel_BrightnessDown_F6')
+ actions.add('Accel_BrightnessUp_F7')
+
def GrepForActions(path, actions):
"""Grep a source file for calls to UserMetrics functions.
@@ -264,6 +270,7 @@ def main(argv):
# print "Found {0} entries".format(len(actions))
AddClosedSourceActions(actions)
+ AddChromeOSActions(actions)
if hash_output:
f = open(chromeactions_path, "w")
« chrome/browser/chromeos/external_metrics.cc ('K') | « chrome/tools/chromeactions.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698