| 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 os | 5 import os |
| 6 import tempfile | 6 import tempfile |
| 7 | 7 |
| 8 from pylib import cmd_helper | 8 from pylib import cmd_helper |
| 9 | 9 |
| 10 # TODO(jbudorick) Remove once telemetry gets switched over. | 10 # TODO(jbudorick) Remove once telemetry gets switched over. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 self._recorder.wait() | 77 self._recorder.wait() |
| 78 | 78 |
| 79 def Pull(self, host_file): | 79 def Pull(self, host_file): |
| 80 """Pull resulting video file from the device. | 80 """Pull resulting video file from the device. |
| 81 | 81 |
| 82 Args: | 82 Args: |
| 83 host_file: Path to the video file to store on the host. | 83 host_file: Path to the video file to store on the host. |
| 84 """ | 84 """ |
| 85 host_file_name = host_file or ('screen-recording-%s.mp4' % | 85 host_file_name = host_file or ('screen-recording-%s.mp4' % |
| 86 self._device.old_interface.GetTimestamp()) | 86 self._device.old_interface.GetTimestamp()) |
| 87 host_file = os.path.abspath(host_file_name) | 87 host_file_name = os.path.abspath(host_file_name) |
| 88 self._device.old_interface.EnsureHostDirectory(self._host_file) | 88 self._device.old_interface.EnsureHostDirectory(host_file_name) |
| 89 self._device.PullFile(self._device_file, host_file_name) | 89 self._device.PullFile(self._device_file, host_file_name) |
| 90 self._device.RunShellCommand('rm -f "%s"' % self._device_file) | 90 self._device.RunShellCommand('rm -f "%s"' % self._device_file) |
| OLD | NEW |