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

Side by Side Diff: tools/perf/profile_creators/update_remote_extensions.py

Issue 1568103002: Update tools/perf to use cloud_storage from catapult. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Erik comment Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 base64 5 import base64
6 import csv 6 import csv
7 import json 7 import json
8 import optparse 8 import optparse
9 import os 9 import os
10 import shutil 10 import shutil
11 import sys 11 import sys
12 import tempfile 12 import tempfile
13 import urllib2 13 import urllib2
14 import zipfile 14 import zipfile
15 15
16 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 16 sys.path.insert(1, os.path.abspath(os.path.join(
17 'telemetry')) 17 __file__, '..', '..')))
18 from core import path_util
18 19
20
21 path_util.AddCatapultBaseToPath()
19 from catapult_base import cloud_storage 22 from catapult_base import cloud_storage
23
24 path_util.AddTelemetryToPath()
20 from telemetry.core import exceptions 25 from telemetry.core import exceptions
21 26
27
22 # Remote target upload directory in cloud storage for extensions. 28 # Remote target upload directory in cloud storage for extensions.
23 REMOTE_DIR = 'extension_set' 29 REMOTE_DIR = 'extension_set'
24 30
25 # Target zip file. 31 # Target zip file.
26 ZIP_NAME = 'extensions.zip' 32 ZIP_NAME = 'extensions.zip'
27 33
28 34
29 def _DownloadCrxFromCws(ext_id, dst): 35 def _DownloadCrxFromCws(ext_id, dst):
30 """Downloads CRX specified from Chrome Web Store. 36 """Downloads CRX specified from Chrome Web Store.
31 37
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 local_extensions_dir = tempfile.mkdtemp() 204 local_extensions_dir = tempfile.mkdtemp()
199 try: 205 try:
200 _UpdateExtensionsInCloud(local_extensions_dir, 206 _UpdateExtensionsInCloud(local_extensions_dir,
201 extension_csv, REMOTE_DIR) 207 extension_csv, REMOTE_DIR)
202 finally: 208 finally:
203 shutil.rmtree(local_extensions_dir) 209 shutil.rmtree(local_extensions_dir)
204 210
205 if __name__ == '__main__': 211 if __name__ == '__main__':
206 main() 212 main()
207 213
OLDNEW
« tools/perf/fetch_benchmark_deps.py ('K') | « tools/perf/profile_creators/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698