Index: tools/telemetry/telemetry/inspector_timeline.py |
diff --git a/tools/telemetry/telemetry/inspector_timeline.py b/tools/telemetry/telemetry/inspector_timeline.py |
index e0810c6e5959bebbd02b18a533384a72ed38ac64..289e5bd2d19200622201709a23914f9d41def910 100644 |
--- a/tools/telemetry/telemetry/inspector_timeline.py |
+++ b/tools/telemetry/telemetry/inspector_timeline.py |
@@ -3,7 +3,7 @@ |
# found in the LICENSE file. |
-class InspectorBackendException(Exception): |
+class TabBackendException(Exception): |
pass |
@@ -59,9 +59,8 @@ class InspectorTimeline(object): |
def __exit__(self, *args): |
self._timeline.Stop() |
- def __init__(self, inspector_backend, tab): |
- self._inspector_backend = inspector_backend |
- self._tab = tab |
+ def __init__(self, tab_backend): |
+ self._tab_backend = tab_backend |
self._is_recording = False |
self._timeline_events = None |
@@ -74,23 +73,23 @@ class InspectorTimeline(object): |
return |
self._timeline_events = TimelineEvents() |
self._is_recording = True |
- self._inspector_backend.RegisterDomain('Timeline', |
+ self._tab_backend.RegisterDomain('Timeline', |
self._OnNotification, self._OnClose) |
req = {'method': 'Timeline.start'} |
self._SendSyncRequest(req) |
def Stop(self): |
if not self._is_recording: |
- raise InspectorBackendException('Stop() called but not started') |
+ raise TabBackendException('Stop() called but not started') |
self._is_recording = False |
req = {'method': 'Timeline.stop'} |
self._SendSyncRequest(req) |
- self._inspector_backend.UnregisterDomain('Timeline') |
+ self._tab_backend.UnregisterDomain('Timeline') |
def _SendSyncRequest(self, req, timeout=60): |
- res = self._inspector_backend.SyncRequest(req, timeout) |
+ res = self._tab_backend.SyncRequest(req, timeout) |
if 'error' in res: |
- raise InspectorBackendException(res['error']['message']) |
+ raise TabBackendException(res['error']['message']) |
return res['result'] |
def _OnNotification(self, msg): |
@@ -101,5 +100,5 @@ class InspectorTimeline(object): |
def _OnClose(self): |
if self._is_recording: |
- raise InspectorBackendException('InspectTimeline received OnClose whilst ' |
+ raise TabBackendException('InspectTimeline received OnClose whilst ' |
'recording.') |