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

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

Issue 10945043: [chrome_remote_control] Use monkey patching for stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 4fbf286b8b4ea4e73cf866d3ece9bf4d1e50eaaa..91c3709a4dad2f05d3a15ca4fbc5ce51b951cc1e 100644
--- a/tools/chrome_remote_control/chrome_remote_control/adb_commands.py
+++ b/tools/chrome_remote_control/chrome_remote_control/adb_commands.py
@@ -17,27 +17,27 @@ sys.path.append(
os.path.join(os.path.dirname(__file__),
'../../../build/android')))
try:
- from pylib import android_commands as real_android_commands
+ from pylib import android_commands
from pylib import forwarder
from pylib import valgrind_tools
except:
- real_android_commands = None
+ android_commands = None
def IsAndroidSupported():
- return real_android_commands != None
+ return android_commands != None
def GetAttachedDevices():
"""Returns a list of attached, online android devices.
If a preferred device has been set with ANDROID_SERIAL, it will be first in
the returned list."""
- return real_android_commands.GetAttachedDevices()
+ return android_commands.GetAttachedDevices()
class ADBCommands(object):
"""A thin wrapper around ADB"""
def __init__(self, device):
- self._adb = real_android_commands.AndroidCommands(device)
+ self._adb = android_commands.AndroidCommands(device)
def Forward(self, local, remote):
ret = self._adb._adb.SendCommand('forward %s %s' % (local, remote))

Powered by Google App Engine
This is Rietveld 408576698