Index: tools/telemetry/telemetry/core/platform/platform_backend.py |
diff --git a/tools/telemetry/telemetry/core/platform/platform_backend.py b/tools/telemetry/telemetry/core/platform/platform_backend.py |
index 4264f035ea1ccfb61ed8195f3769e9d3b33d36d0..6fa1b23d811dcb82ebc40e02ffa50c21ca382115 100644 |
--- a/tools/telemetry/telemetry/core/platform/platform_backend.py |
+++ b/tools/telemetry/telemetry/core/platform/platform_backend.py |
@@ -123,11 +123,11 @@ class PlatformBackend(object): |
# tied to the browser. https://crbug.com/424777 |
self._network_controller_backend.StopReplay() |
- is_last_browser = len(self._running_browser_backends) == 1 |
+ is_last_browser = len(self._running_browser_backends) <= 1 |
if is_last_browser: |
self.SetFullPerformanceModeEnabled(False) |
- self._running_browser_backends.remove(browser_backend) |
+ self._running_browser_backends.discard(browser_backend) |
def GetBackendForBrowser(self, browser): |
matches = [x for x in self._running_browser_backends |
@@ -264,3 +264,16 @@ class PlatformBackend(object): |
@property |
def wpr_ca_cert_path(self): |
return None |
+ |
+ def IsProcessRunning(self, proc): |
+ return proc and proc.poll() == None |
+ |
+ def IsCooperativeShutdownSupported(self): |
+ return False |
+ |
+ def CooperativelyShutdown(self, proc): |
+ """Cooperatively shut down the given process from subprocess.Popen. |
+ Returns True if it is believed the attempt succeeded. |
+ |
+ Currently this is only implemented on Windows.""" |
+ raise NotImplementedError() |