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

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

Issue 1881573002: [Perf] Guard against impending output_profile_path option move. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 copy 5 import copy
6 6
7 from telemetry.core import platform 7 from telemetry.core import platform
8 from telemetry.util import wpr_modes 8 from telemetry.util import wpr_modes
9 from telemetry.internal.browser import browser_finder 9 from telemetry.internal.browser import browser_finder
10 from telemetry.internal.browser import browser_finder_exceptions 10 from telemetry.internal.browser import browser_finder_exceptions
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return None 54 return None
55 55
56 @property 56 @property
57 def finder_options(self): 57 def finder_options(self):
58 """The options to use to find and run the browser.""" 58 """The options to use to find and run the browser."""
59 return self._finder_options 59 return self._finder_options
60 60
61 @property 61 @property
62 def profile_path(self): 62 def profile_path(self):
63 """The path of the profile that the browser will use while it's running.""" 63 """The path of the profile that the browser will use while it's running."""
64 return self.finder_options.output_profile_path 64 # TODO(eakuefner): Remove this after crrev.com/1874473006 rolls in.
65 return getattr(self.finder_options, 'output_profile_path',
66 self.finder_options.browser_options.output_profile_path)
65 67
66 @property 68 @property
67 def browser(self): 69 def browser(self):
68 return self._browser 70 return self._browser
69 71
70 @property 72 @property
71 def os_name(self): 73 def os_name(self):
72 """Name of OS that extender is currently running on.""" 74 """Name of OS that extender is currently running on."""
73 return self._os_name 75 return self._os_name
74 76
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 """Return a possible_browser with the given options.""" 153 """Return a possible_browser with the given options."""
152 possible_browser = browser_finder.FindBrowser(finder_options) 154 possible_browser = browser_finder.FindBrowser(finder_options)
153 if not possible_browser: 155 if not possible_browser:
154 raise browser_finder_exceptions.BrowserFinderException( 156 raise browser_finder_exceptions.BrowserFinderException(
155 'No browser found.\n\nAvailable browsers:\n%s\n' % 157 'No browser found.\n\nAvailable browsers:\n%s\n' %
156 '\n'.join(browser_finder.GetAllAvailableBrowserTypes(finder_options))) 158 '\n'.join(browser_finder.GetAllAvailableBrowserTypes(finder_options)))
157 finder_options.browser_options.browser_type = ( 159 finder_options.browser_options.browser_type = (
158 possible_browser.browser_type) 160 possible_browser.browser_type)
159 161
160 return possible_browser 162 return possible_browser
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/extension_profile_extender_unittest.py ('k') | tools/perf/profile_creators/profile_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698