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

Unified Diff: tools/profile_chrome/main.py

Issue 1132993004: [Android] Remove more references to and uses of AndroidCommands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « tools/profile_chrome/controllers_unittest.py ('k') | tools/profile_chrome/perf_controller.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profile_chrome/main.py
diff --git a/tools/profile_chrome/main.py b/tools/profile_chrome/main.py
index 25adbfb6515e333d5d9a8c8cffdaebd50bc302db..7db45fb9aa18f5384d403863b1b8d4cf8b1c19b3 100755
--- a/tools/profile_chrome/main.py
+++ b/tools/profile_chrome/main.py
@@ -18,7 +18,6 @@ from profile_chrome import profiler
from profile_chrome import systrace_controller
from profile_chrome import ui
-from pylib import android_commands
from pylib.device import device_utils
@@ -170,15 +169,15 @@ When in doubt, just try out --trace-frame-viewer.
if options.verbose:
logging.getLogger().setLevel(logging.DEBUG)
- devices = android_commands.GetAttachedDevices()
+ devices = device_utils.DeviceUtils.HealthyDevices()
device = None
- if options.device in devices:
- device = options.device
- elif not options.device and len(devices) == 1:
+ if options.device:
+ device = next((d for d in devices if d == options.device), None)
+ elif len(devices) == 1:
device = devices[0]
+
if not device:
parser.error('Use -d/--device to select a device:\n' + '\n'.join(devices))
- device = device_utils.DeviceUtils(device)
package_info = profiler.GetSupportedBrowsers()[options.browser]
if options.chrome_categories in ['list', 'help']:
« no previous file with comments | « tools/profile_chrome/controllers_unittest.py ('k') | tools/profile_chrome/perf_controller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698