Index: tools/metrics/actions/extract_actions.py |
=================================================================== |
--- tools/metrics/actions/extract_actions.py (revision 223113) |
+++ tools/metrics/actions/extract_actions.py (working copy) |
@@ -174,6 +174,8 @@ |
actions.add('PDF.FitToWidthButton') |
actions.add('PDF.LoadFailure') |
actions.add('PDF.LoadSuccess') |
+ actions.add('PDF.SaveButton') |
+ actions.add('PDF.PrintButton') |
Ilya Sherman
2013/09/14 03:07:30
nit: Please alphabetize (I know the list is alread
jam
2013/09/15 21:58:14
Done.
|
actions.add('PDF.PreviewDocumentLoadFailure') |
actions.add('PDF.ZoomFromBrowser') |
actions.add('PDF.ZoomOutButton') |
@@ -477,12 +479,18 @@ |
# We look for the ViewHostMsg_UserMetricsRecordAction constructor. |
# This should be on one line. |
action_re = re.compile( |
- r'[^a-zA-Z]RenderThread::RecordUserMetrics\("([^"]*)') |
+ r'[^a-zA-Z]RenderThread::Get\(\)->RecordUserMetrics\("([^"]*)') |
+ action_re2 = re.compile( |
+ r'[^a-zA-Z]RenderThreadImpl::current\(\)->RecordUserMetrics\("([^"]*)') |
Ilya Sherman
2013/09/14 03:07:30
Hmm, why doesn't the RenderThread class use the Us
jam
2013/09/15 21:58:14
UserMetricsAction is used in the browser process,
Ilya Sherman
2013/09/16 19:50:03
Yes, I see that that's currently the case. My que
|
line_number = 0 |
Ilya Sherman
2013/09/14 03:07:30
As long as you're editing nearby code, let's get r
jam
2013/09/15 21:58:14
Done.
|
for line in open(path): |
match = action_re.search(line) |
- if match: # Plain call to RecordAction |
+ if match: # Call to RecordUserMetrics through Content API |
actions.add(match.group(1)) |
+ continue |
+ match = action_re2.search(line) |
+ if match: # Call to RecordUserMetrics inside Content |
+ actions.add(match.group(1)) |
def AddLiteralActions(actions): |
"""Add literal actions specified via calls to UserMetrics functions. |