| Index: systrace/profile_chrome/chrome_tracing_agent.py
|
| diff --git a/systrace/profile_chrome/chrome_tracing_agent.py b/systrace/profile_chrome/chrome_tracing_agent.py
|
| index 1e8895bd2354fb714515181495fff0c86aeb7d1e..5967ad137e59bc41533b6428d999eccf7c34831f 100644
|
| --- a/systrace/profile_chrome/chrome_tracing_agent.py
|
| +++ b/systrace/profile_chrome/chrome_tracing_agent.py
|
| @@ -12,6 +12,7 @@ from devil.android import device_errors
|
| from devil.android.sdk import intent
|
| from systrace import trace_result
|
| from systrace import tracing_agents
|
| +from telemetry.timeline import trace_data as trace_data_module
|
|
|
|
|
| DEFAULT_CHROME_CATEGORIES = '_DEFAULT_CHROME_CATEGORIES'
|
| @@ -110,6 +111,11 @@ class ChromeTracingAgent(tracing_agents.TracingAgent):
|
| trace_data = f.read()
|
| return trace_result.TraceResult('traceEvents', trace_data)
|
|
|
| + def CollectAgentTraceData(self, trace_data_builder):
|
| + with open(self._PullTrace(), 'r') as f:
|
| + data = f.read()
|
| + trace_data_builder.AddTraceFor(trace_data_module.CHROME_TRACE_PART, data)
|
| +
|
| def _PullTrace(self):
|
| trace_file = self._trace_file.replace('/storage/emulated/0/', '/sdcard/')
|
| host_file = os.path.join(os.path.curdir, os.path.basename(trace_file))
|
|
|