Chromium Code Reviews| Index: tools/android/loading/tracing.py |
| diff --git a/tools/android/loading/tracing.py b/tools/android/loading/tracing.py |
| index 7071011796de5cfc6e536b42e57616c793657399..caaba816ec33c2bc6451bfab90abd9c003572b8c 100644 |
| --- a/tools/android/loading/tracing.py |
| +++ b/tools/android/loading/tracing.py |
| @@ -12,12 +12,17 @@ import operator |
| import devtools_monitor |
| +DEFAULT_CATEGORIES = None |
|
mattcary
2016/02/19 14:41:05
What's the point of creating this? Seems just to b
gabadie
2016/02/19 15:04:35
Ensure consistency with the callers that can optio
|
| + |
| + |
| class TracingTrack(devtools_monitor.Track): |
| """Grabs and processes trace event messages. |
| See https://goo.gl/Qabkqk for details on the protocol. |
| """ |
| - def __init__(self, connection, categories=None, fetch_stream=False): |
| + def __init__(self, connection, |
| + categories=DEFAULT_CATEGORIES, |
| + fetch_stream=False): |
| """Initialize this TracingTrack. |
| Args: |
| @@ -304,6 +309,18 @@ class Event(object): |
| return self._tracing_event['ph'] |
| @property |
| + def category(self): |
| + return self._tracing_event['cat'] |
| + |
| + @property |
| + def name(self): |
| + return self._tracing_event['name'] |
| + |
| + @property |
| + def pid(self): |
| + return self._tracing_event['pid'] |
| + |
| + @property |
| def args(self): |
| return self._tracing_event.get('args', {}) |