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

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

Issue 2300653002: [tools/perf] Update code to reference py_utils.cloud_storage (Closed)
Patch Set: update Created 4 years, 3 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 atexit 5 import atexit
6 import json 6 import json
7 import logging 7 import logging
8 import os 8 import os
9 import shutil 9 import shutil
10 import sys 10 import sys
11 import time 11 import time
12 import zipfile 12 import zipfile
13 13
14 if sys.platform == 'win32': 14 if sys.platform == 'win32':
15 import _winreg as winreg # pylint: disable=import-error 15 import _winreg as winreg # pylint: disable=import-error
16 16
17 from catapult_base import cloud_storage
18 from profile_creators import profile_extender 17 from profile_creators import profile_extender
18 from py_utils import cloud_storage
19 from telemetry.core import exceptions 19 from telemetry.core import exceptions
20 20
21 21
22 # Remote target upload directory in cloud storage for extensions. 22 # Remote target upload directory in cloud storage for extensions.
23 REMOTE_DIR = 'extension_set' 23 REMOTE_DIR = 'extension_set'
24 24
25 # Target zip file. 25 # Target zip file.
26 ZIP_NAME = 'extensions.zip' 26 ZIP_NAME = 'extensions.zip'
27 27
28 28
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 def _WaitForExtensionsToLoad(self): 166 def _WaitForExtensionsToLoad(self):
167 """Stall until browser has finished installing/loading all extensions.""" 167 """Stall until browser has finished installing/loading all extensions."""
168 unloaded_extensions = set(self._extensions) 168 unloaded_extensions = set(self._extensions)
169 while unloaded_extensions: 169 while unloaded_extensions:
170 loaded_extensions = set([key.extension_id for key in 170 loaded_extensions = set([key.extension_id for key in
171 self.browser.extensions.keys()]) 171 self.browser.extensions.keys()])
172 unloaded_extensions = unloaded_extensions - loaded_extensions 172 unloaded_extensions = unloaded_extensions - loaded_extensions
173 # There's no event signalling when browser finishes installing 173 # There's no event signalling when browser finishes installing
174 # or loading an extension so re-check every 5 seconds. 174 # or loading an extension so re-check every 5 seconds.
175 time.sleep(5) 175 time.sleep(5)
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/__init__.py ('k') | tools/perf/profile_creators/update_remote_extensions.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698