| OLD | NEW |
| 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 weakref | 5 import weakref |
| 6 | 6 |
| 7 from battor import battor_wrapper |
| 7 from telemetry.internal import forwarders | 8 from telemetry.internal import forwarders |
| 8 from telemetry.internal.forwarders import do_nothing_forwarder | 9 from telemetry.internal.forwarders import do_nothing_forwarder |
| 9 from telemetry.internal.platform import network_controller_backend | 10 from telemetry.internal.platform import network_controller_backend |
| 10 from telemetry.internal.platform import tracing_controller_backend | 11 from telemetry.internal.platform import tracing_controller_backend |
| 11 | 12 |
| 12 | 13 |
| 13 # pylint: disable=unused-argument | 14 # pylint: disable=unused-argument |
| 14 | 15 |
| 15 class PlatformBackend(object): | 16 class PlatformBackend(object): |
| 16 | 17 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 def PathExists(self, path, timeout=None, retries=None): | 287 def PathExists(self, path, timeout=None, retries=None): |
| 287 """Tests whether the given path exists on the target platform. | 288 """Tests whether the given path exists on the target platform. |
| 288 Args: | 289 Args: |
| 289 path: path in request. | 290 path: path in request. |
| 290 timeout: timeout. | 291 timeout: timeout. |
| 291 retries: num of retries. | 292 retries: num of retries. |
| 292 Return: | 293 Return: |
| 293 Whether the path exists on the target platform. | 294 Whether the path exists on the target platform. |
| 294 """ | 295 """ |
| 295 raise NotImplementedError() | 296 raise NotImplementedError() |
| 297 |
| 298 def HasBattOrConnected(self): |
| 299 return battor_wrapper.IsBattOrConnected(self.GetOSName()) |
| OLD | NEW |