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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/adb_commands.py

Issue 11231087: Removing flake in TemporaryHTTPServer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/chrome_remote_control/chrome_remote_control/adb_commands.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/adb_commands.py b/tools/chrome_remote_control/chrome_remote_control/adb_commands.py
index d0a35286547725a0f01b0e436736ac2dccb2ed5f..f503a22de55b3cd7ab85a83faca212615863c292 100644
--- a/tools/chrome_remote_control/chrome_remote_control/adb_commands.py
+++ b/tools/chrome_remote_control/chrome_remote_control/adb_commands.py
@@ -127,7 +127,7 @@ def HasForwarder(adb, buildtype=None):
os.path.exists(os.path.join('out', buildtype, 'host_forwarder')))
class Forwarder(object):
- def __init__(self, adb, host_port):
+ def __init__(self, adb, host_port, remote_port=None):
assert HasForwarder(adb)
port_pairs = [(host_port, host_port), ]
@@ -140,7 +140,10 @@ class Forwarder(object):
self._forwarder = forwarder.Forwarder(
adb.Adb(), port_pairs,
tool, '127.0.0.1', buildtype)
- self._device_port = self._forwarder.DevicePortForHostPort(self._host_port)
+ if remote_port is None:
+ self._device_port = self._forwarder.DevicePortForHostPort(self._host_port)
+ else:
+ self._device_port = remote_port
@property
def url(self):

Powered by Google App Engine
This is Rietveld 408576698