| Index: telemetry/telemetry/web_perf/timeline_based_measurement.py
 | 
| diff --git a/telemetry/telemetry/web_perf/timeline_based_measurement.py b/telemetry/telemetry/web_perf/timeline_based_measurement.py
 | 
| index 961ed9120e26de4bd13871c5ed8522fe83e4c61a..921162072e012e06e22baafe25064a2a83940fb8 100644
 | 
| --- a/telemetry/telemetry/web_perf/timeline_based_measurement.py
 | 
| +++ b/telemetry/telemetry/web_perf/timeline_based_measurement.py
 | 
| @@ -284,6 +284,9 @@ class TimelineBasedMeasurement(story_test.StoryTest):
 | 
|        chrome_config.category_filter.AddIncludedCategory('blink.console')
 | 
|      platform.tracing_controller.StartTracing(self._tbm_options.config)
 | 
|  
 | 
| +  def GetTimelineBasedMetrics(self):
 | 
| +    return self._tbm_options.GetTimelineBasedMetrics()
 | 
| +
 | 
|    def Measure(self, platform, results):
 | 
|      """Collect all possible metrics and added them to results."""
 | 
|      platform.tracing_controller.telemetry_info = results.telemetry_info
 | 
| @@ -291,11 +294,13 @@ class TimelineBasedMeasurement(story_test.StoryTest):
 | 
|      trace_value = trace.TraceValue(results.current_page, trace_result)
 | 
|      results.AddValue(trace_value)
 | 
|  
 | 
| -    try:
 | 
| -      if self._tbm_options.GetTimelineBasedMetrics():
 | 
| -        assert not self._tbm_options.GetLegacyTimelineBasedMetrics(), (
 | 
| -            'Specifying both TBMv1 and TBMv2 metrics is not allowed.')
 | 
| -        self._ComputeTimelineBasedMetrics(results, trace_value)
 | 
| +    if self.GetTimelineBasedMetrics():
 | 
| +      self._ComputeTimelineBasedMetrics(results, trace_value)
 | 
| +      # Legacy metrics can be computed, but only if explicitly specified.
 | 
| +      if self._tbm_options.GetLegacyTimelineBasedMetrics():
 | 
| +        # Since this imports the trace model in python, it will also clean up
 | 
| +        # the trace handles for us.
 | 
| +        self._ComputeLegacyTimelineBasedMetrics(results, trace_result)
 | 
|        else:
 | 
|          # Run all TBMv1 metrics if no other metric is specified
 | 
|          # (legacy behavior)
 | 
| @@ -315,7 +320,7 @@ class TimelineBasedMeasurement(story_test.StoryTest):
 | 
|        platform.tracing_controller.StopTracing()
 | 
|  
 | 
|    def _ComputeTimelineBasedMetrics(self, results, trace_value):
 | 
| -    metrics = self._tbm_options.GetTimelineBasedMetrics()
 | 
| +    metrics = self.GetTimelineBasedMetrics()
 | 
|      extra_import_options = {
 | 
|        'trackDetailedModelStats': True
 | 
|      }
 | 
| 
 |