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

Unified Diff: tools/perf/measurements/timeline_controller.py

Issue 471763003: Remove deprecated methods related to tracing in browser.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: tools/perf/measurements/timeline_controller.py
diff --git a/tools/perf/measurements/timeline_controller.py b/tools/perf/measurements/timeline_controller.py
index 27a1ac63cdc4d02db99ac263dbb031f2bc1d04b9..9206751e7b959fece689d96aceaafbaa50376f1d 100644
--- a/tools/perf/measurements/timeline_controller.py
+++ b/tools/perf/measurements/timeline_controller.py
@@ -4,6 +4,7 @@
from measurements import smooth_gesture_util
from telemetry.core.platform import tracing_category_filter
+from telemetry.core.platform import tracing_options
from telemetry.timeline.model import TimelineModel
from telemetry.page.actions import action_runner
from telemetry.web_perf import timeline_interaction_record as tir_module
@@ -28,13 +29,16 @@ class TimelineController(object):
# Resets these member variables incase this object is reused.
self._model = None
self._renderer_process = None
- if not tab.browser.supports_tracing:
+ if not tab.browser.platform.tracing_controller.IsChromeTracingSupported(
+ tab.browser):
raise Exception('Not supported')
category_filter = tracing_category_filter.TracingCategoryFilter(
filter_string=self.trace_categories)
for delay in page.GetSyntheticDelayCategories():
category_filter.AddSyntheticDelay(delay)
- tab.browser.StartTracing(category_filter)
+ options = tracing_options.TracingOptions()
+ options.enable_chrome_trace = True
+ tab.browser.platform.tracing_controller.Start(options, category_filter)
def Start(self, tab):
# Start the smooth marker for all actions.
@@ -46,7 +50,7 @@ class TimelineController(object):
# End the smooth marker for all actions.
self._interaction.End()
# Stop tracing.
- timeline_data = tab.browser.StopTracing()
+ timeline_data = tab.browser.platform.tracing_controller.Stop()
self._model = TimelineModel(timeline_data)
self._renderer_process = self._model.GetRendererProcessFromTabId(tab.id)
renderer_thread = self.model.GetRendererThreadFromTabId(tab.id)
@@ -76,8 +80,8 @@ class TimelineController(object):
def CleanUp(self, tab):
- if tab.browser.is_tracing_running:
- tab.browser.StopTracing()
+ if tab.browser.platform.tracing_controller.is_tracing_running:
+ tab.browser.platform.tracing_controller.Stop()
@property
def model(self):

Powered by Google App Engine
This is Rietveld 408576698