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

Unified Diff: devil/devil/android/device_utils.py

Issue 2781953002: Allow atrace over adb tcp/ip (Closed)
Patch Set: Created 3 years, 9 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 | systrace/systrace/tracing_agents/atrace_agent.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/device_utils.py
diff --git a/devil/devil/android/device_utils.py b/devil/devil/android/device_utils.py
index 7ba1b51448713b2ae2964d609d3026b76cf3f53f..7d6028b0a719c56add6b26f47d595b97a1cfc0d7 100644
--- a/devil/devil/android/device_utils.py
+++ b/devil/devil/android/device_utils.py
@@ -258,8 +258,8 @@ def _IsGceInstance(serial):
return _IPV4_ADDRESS_RE.match(serial)
-def _CreateAdbWrapper(device):
- if _IsGceInstance(str(device)):
+def _CreateAdbWrapper(device, disable_gce=False):
+ if not disable_gce and _IsGceInstance(str(device)):
return gce_adb_wrapper.GceAdbWrapper(str(device))
else:
if isinstance(device, adb_wrapper.AdbWrapper):
@@ -295,7 +295,7 @@ class DeviceUtils(object):
def __init__(self, device, enable_device_files_cache=False,
default_timeout=_DEFAULT_TIMEOUT,
- default_retries=_DEFAULT_RETRIES):
+ default_retries=_DEFAULT_RETRIES, disable_gce=False):
jbudorick 2017/03/28 20:36:03 I don't think this is the right way to handle this
sahilja 2017/04/04 19:24:16 Done.
"""DeviceUtils constructor.
Args:
@@ -310,7 +310,7 @@ class DeviceUtils(object):
"""
self.adb = None
if isinstance(device, basestring):
- self.adb = _CreateAdbWrapper(device)
+ self.adb = _CreateAdbWrapper(device, disable_gce)
elif isinstance(device, adb_wrapper.AdbWrapper):
self.adb = device
else:
« no previous file with comments | « no previous file | systrace/systrace/tracing_agents/atrace_agent.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698