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

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

Issue 1124543006: Telemetry: Update exception handling in FastNavigationProfileExtender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 from telemetry.core import browser_finder 5 from telemetry.core import browser_finder
6 from telemetry.core import browser_finder_exceptions 6 from telemetry.core import browser_finder_exceptions
7 from telemetry.core import platform 7 from telemetry.core import platform
8 from telemetry.core import wpr_modes 8 from telemetry.core import wpr_modes
9 9
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 def TearDownBrowser(self): 80 def TearDownBrowser(self):
81 """Tears down the browser. 81 """Tears down the browser.
82 82
83 Can be overridden by subclasses. The subclass implementation must call the 83 Can be overridden by subclasses. The subclass implementation must call the
84 super class implementation. 84 super class implementation.
85 """ 85 """
86 if self._browser: 86 if self._browser:
87 self._browser.Close() 87 self._browser.Close()
88 self._browser = None 88 self._browser = None
89 89
90 def VerifyProfileWasExtended(self):
91 """Verifies that the profile was correctly extended.
92
93 Can be overridden by subclasses.
94 """
95 pass
96
90 def FetchWebPageReplayArchives(self): 97 def FetchWebPageReplayArchives(self):
91 """Fetches the web page replay archives. 98 """Fetches the web page replay archives.
92 99
93 Can be overridden by subclasses. 100 Can be overridden by subclasses.
94 """ 101 """
95 pass 102 pass
96 103
97 def _SetUpWebPageReplay(self, finder_options, possible_browser): 104 def _SetUpWebPageReplay(self, finder_options, possible_browser):
98 """Sets up Web Page Replay, if necessary.""" 105 """Sets up Web Page Replay, if necessary."""
99 106
(...skipping 23 matching lines...) Expand all
123 possible_browser = browser_finder.FindBrowser(finder_options) 130 possible_browser = browser_finder.FindBrowser(finder_options)
124 if not possible_browser: 131 if not possible_browser:
125 raise browser_finder_exceptions.BrowserFinderException( 132 raise browser_finder_exceptions.BrowserFinderException(
126 'No browser found.\n\nAvailable browsers:\n%s\n' % 133 'No browser found.\n\nAvailable browsers:\n%s\n' %
127 '\n'.join(browser_finder.GetAllAvailableBrowserTypes(finder_options))) 134 '\n'.join(browser_finder.GetAllAvailableBrowserTypes(finder_options)))
128 finder_options.browser_options.browser_type = ( 135 finder_options.browser_options.browser_type = (
129 possible_browser.browser_type) 136 possible_browser.browser_type)
130 137
131 return possible_browser 138 return possible_browser
132 139
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698