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

Side by Side Diff: tools/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py

Issue 1254843002: telemetry: Fix killing the perf profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 5 years, 4 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 import logging 5 import logging
6 import sys 6 import sys
7 7
8 from telemetry.core import exceptions 8 from telemetry.core import exceptions
9 from telemetry.internal.platform import android_platform_backend as \ 9 from telemetry.internal.platform import android_platform_backend as \
10 android_platform_backend_module 10 android_platform_backend_module
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 args.append('--enable-remote-debugging') 134 args.append('--enable-remote-debugging')
135 args.append('--disable-fre') 135 args.append('--disable-fre')
136 args.append('--disable-external-intent-requests') 136 args.append('--disable-external-intent-requests')
137 return args 137 return args
138 138
139 @property 139 @property
140 def pid(self): 140 def pid(self):
141 pids = self.device.GetPids(self._backend_settings.package) 141 pids = self.device.GetPids(self._backend_settings.package)
142 if not pids or self._backend_settings.package not in pids: 142 if not pids or self._backend_settings.package not in pids:
143 raise exceptions.BrowserGoneException(self.browser) 143 raise exceptions.BrowserGoneException(self.browser)
144 return int(pids[self._backend_settings.package]) 144 if len(pids[self._backend_settings.package]) > 1:
145 raise Exception(
146 'At most one instance of process %s expected but found pids: '
147 '%s' % (self._backend_settings.package, pids))
148 return int(pids[self._backend_settings.package][0])
145 149
146 @property 150 @property
147 def browser_directory(self): 151 def browser_directory(self):
148 return None 152 return None
149 153
150 @property 154 @property
151 def profile_directory(self): 155 def profile_directory(self):
152 return self._backend_settings.profile_dir 156 return self._backend_settings.profile_dir
153 157
154 @property 158 @property
(...skipping 23 matching lines...) Expand all
178 182
179 def GetStandardOutput(self): 183 def GetStandardOutput(self):
180 return self.platform_backend.GetStandardOutput() 184 return self.platform_backend.GetStandardOutput()
181 185
182 def GetStackTrace(self): 186 def GetStackTrace(self):
183 return self.platform_backend.GetStackTrace(self._target_arch) 187 return self.platform_backend.GetStackTrace(self._target_arch)
184 188
185 @property 189 @property
186 def should_ignore_certificate_errors(self): 190 def should_ignore_certificate_errors(self):
187 return not self.platform_backend.is_test_ca_installed 191 return not self.platform_backend.is_test_ca_installed
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698