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

Side by Side Diff: build/android/gyp/util/build_device.py

Issue 142923005: Allow MessageFilters to restrict listening to specific message classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Working patch Created 6 years, 10 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ A simple device interface for build steps. 5 """ A simple device interface for build steps.
6 6
7 """ 7 """
8 8
9 import logging 9 import logging
10 import os 10 import os
11 import re 11 import re
12 import sys 12 import sys
13 13
14 import build_utils # pylint: disable=F0401 14 import build_utils # pylint: disable=F0401
15 15
16 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..', '..') 16 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..', '..')
17 sys.path.append(BUILD_ANDROID_DIR) 17 sys.path.append(BUILD_ANDROID_DIR)
18 18
19 from pylib import android_commands 19 from pylib import android_commands
20 20
21 from pylib.android_commands import GetAttachedDevices
21 22
22 class BuildDevice(object): 23 class BuildDevice(object):
23 def __init__(self, configuration): 24 def __init__(self, configuration):
24 self.id = configuration['id'] 25 self.id = configuration['id']
25 self.description = configuration['description'] 26 self.description = configuration['description']
26 self.install_metadata = configuration['install_metadata'] 27 self.install_metadata = configuration['install_metadata']
27 self.adb = android_commands.AndroidCommands(self.id) 28 self.adb = android_commands.AndroidCommands(self.id)
28 29
29 def RunShellCommand(self, *args, **kwargs): 30 def RunShellCommand(self, *args, **kwargs):
30 return self.adb.RunShellCommand(*args, **kwargs) 31 return self.adb.RunShellCommand(*args, **kwargs)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 assert len(configurations) == 1 88 assert len(configurations) == 1
88 return BuildDevice(configurations[0]) 89 return BuildDevice(configurations[0])
89 90
90 91
91 def GetBuildDeviceFromPath(path): 92 def GetBuildDeviceFromPath(path):
92 configurations = ReadConfigurations(path) 93 configurations = ReadConfigurations(path)
93 if len(configurations) > 0: 94 if len(configurations) > 0:
94 return GetBuildDevice(ReadConfigurations(path)) 95 return GetBuildDevice(ReadConfigurations(path))
95 return None 96 return None
96 97
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_net_benchmarking_message_filter.cc » ('j') | ipc/ipc_channel_proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698