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

Unified Diff: tools/telemetry/telemetry/core/backends/browser_backend.py

Issue 165693006: [Telemetry] Factor out common logic between inspector backend lists. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments Created 6 years, 10 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
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/browser_backend.py
diff --git a/tools/telemetry/telemetry/core/backends/browser_backend.py b/tools/telemetry/telemetry/core/backends/browser_backend.py
index d935eff73725973fe1c4c3ee8f96a2f24f5aa0ac..9298a6f305a58f14fa6ae519f87b89863933e75a 100644
--- a/tools/telemetry/telemetry/core/backends/browser_backend.py
+++ b/tools/telemetry/telemetry/core/backends/browser_backend.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from telemetry import decorators
+
from telemetry.core import web_contents
from telemetry.core.forwarders import do_nothing_forwarder
@@ -21,7 +23,7 @@ class BrowserBackend(object):
self._supports_extensions = supports_extensions
self.browser_options = browser_options
self._browser = None
- self._tab_list_backend = tab_list_backend(self)
+ self._tab_list_backend_class = tab_list_backend
self._forwarder_factory = None
def AddReplayServerOptions(self, extra_wpr_args):
@@ -29,7 +31,6 @@ class BrowserBackend(object):
def SetBrowser(self, browser):
self._browser = browser
- self._tab_list_backend.Init()
if (self.browser_options.netsim and
not browser.platform.CanLaunchApplication('ipfw')):
browser.platform.InstallApplication('ipfw')
@@ -52,8 +53,9 @@ class BrowserBackend(object):
raise NotImplementedError()
@property
+ @decorators.Cache
def tab_list_backend(self):
- return self._tab_list_backend
+ return self._tab_list_backend_class(self)
@property
def supports_tracing(self):
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698