OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Archives or replays webpages and creates SKPs in a Google Storage location. | 6 """Archives or replays webpages and creates SKPs in a Google Storage location. |
7 | 7 |
8 To archive webpages and store SKP files (archives should be rarely updated): | 8 To archive webpages and store SKP files (archives should be rarely updated): |
9 | 9 |
10 cd skia | 10 cd skia |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 def does_storage_object_exist(self, name): | 459 def does_storage_object_exist(self, name): |
460 raise NotImplementedError() | 460 raise NotImplementedError() |
461 def download_file(self, name, local_path): | 461 def download_file(self, name, local_path): |
462 raise NotImplementedError() | 462 raise NotImplementedError() |
463 def upload_dir_contents(self, source_dir, dest_dir): | 463 def upload_dir_contents(self, source_dir, dest_dir): |
464 raise NotImplementedError() | 464 raise NotImplementedError() |
465 | 465 |
466 | 466 |
467 class GoogleStorageDataStore(DataStore): | 467 class GoogleStorageDataStore(DataStore): |
468 def __init__(self, data_store_url): | 468 def __init__(self, data_store_url): |
469 self._url = data_store_url | 469 self._url = data_store_url.rstrip('/') |
470 | 470 |
471 def target_name(self): | 471 def target_name(self): |
472 return self._url | 472 return self._url |
473 | 473 |
474 def target_type(self): | 474 def target_type(self): |
475 return 'Google Storage' | 475 return 'Google Storage' |
476 | 476 |
477 def does_storage_object_exist(self, name): | 477 def does_storage_object_exist(self, name): |
478 try: | 478 try: |
479 output = subprocess.check_output([ | 479 output = subprocess.check_output([ |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 '--skia_tools is specified then the debugger is not run.', | 585 '--skia_tools is specified then the debugger is not run.', |
586 default=False) | 586 default=False) |
587 option_parser.add_option( | 587 option_parser.add_option( |
588 '', '--skp_prefix', | 588 '', '--skp_prefix', |
589 help='Prefix to add to the names of generated SKPs.', | 589 help='Prefix to add to the names of generated SKPs.', |
590 default=None) | 590 default=None) |
591 options, unused_args = option_parser.parse_args() | 591 options, unused_args = option_parser.parse_args() |
592 | 592 |
593 playback = SkPicturePlayback(options) | 593 playback = SkPicturePlayback(options) |
594 sys.exit(playback.Run()) | 594 sys.exit(playback.Run()) |
OLD | NEW |