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

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

Issue 515603002: [Telemetry] Clean up host platform hack in AndroidPlatformBackend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/android_platform_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 49cf3fb9fa9e6c04b836888a895ebc6f3d5395ba..26b5df4cf04e69a9c680b1e81eec8acce7ba9f37 100644
--- a/tools/telemetry/telemetry/core/backends/browser_backend.py
+++ b/tools/telemetry/telemetry/core/backends/browser_backend.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
from telemetry import decorators
+from telemetry.core import platform
from telemetry.core import web_contents
from telemetry.core.forwarders import do_nothing_forwarder
@@ -28,9 +29,10 @@ class BrowserBackend(object):
def SetBrowser(self, browser):
self._browser = browser
- if (self.browser_options.netsim and
- not browser.platform.CanLaunchApplication('ipfw')):
- browser.platform.InstallApplication('ipfw')
+ if self.browser_options.netsim:
+ host_platform = platform.GetHostPlatform()
+ if not host_platform.CanLaunchApplication('ipfw'):
+ host_platform.InstallApplication('ipfw')
@property
def browser(self):
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698