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

Unified Diff: tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_console.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/telemetry/telemetry/internal/backends/chrome_inspector/inspector_console.py
diff --git a/tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_console.py b/tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_console.py
deleted file mode 100644
index 3304bb3fad825a8761fbbfe12fd5f84fa6a8a13d..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_console.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-class InspectorConsole(object):
- def __init__(self, inspector_websocket):
- self._inspector_websocket = inspector_websocket
- self._inspector_websocket.RegisterDomain('Console', self._OnNotification)
- self._message_output_stream = None
- self._last_message = None
- self._console_enabled = False
-
- def _OnNotification(self, msg):
- if msg['method'] == 'Console.messageAdded':
- if msg['params']['message']['url'] == 'chrome://newtab/':
- return
- self._last_message = 'At %s:%i: %s' % (
- msg['params']['message']['url'],
- msg['params']['message']['line'],
- msg['params']['message']['text'])
- if self._message_output_stream:
- self._message_output_stream.write(
- '%s\n' % self._last_message)
-
- elif msg['method'] == 'Console.messageRepeatCountUpdated':
- if self._message_output_stream:
- self._message_output_stream.write(
- '%s\n' % self._last_message)
-
- # False positive in PyLint 0.25.1: http://www.logilab.org/89092
- @property
- def message_output_stream(self): # pylint: disable=method-hidden
- return self._message_output_stream
-
- @message_output_stream.setter
- def message_output_stream(self, stream): # pylint: disable=method-hidden
- self._message_output_stream = stream
- self._UpdateConsoleEnabledState()
-
- def _UpdateConsoleEnabledState(self):
- enabled = self._message_output_stream != None
- if enabled == self._console_enabled:
- return
-
- if enabled:
- method_name = 'enable'
- else:
- method_name = 'disable'
- self._inspector_websocket.SyncRequest({
- 'method': 'Console.%s' % method_name
- })
- self._console_enabled = enabled

Powered by Google App Engine
This is Rietveld 408576698