| Index: tools/perf/profile_creators/profile_extender.py
|
| diff --git a/tools/perf/profile_creators/profile_extender.py b/tools/perf/profile_creators/profile_extender.py
|
| index 22ace38fbe5ad168be2f39b89fd5555c551b1a3e..ea349d10194747647c258c5f07cc54ae7d59866e 100644
|
| --- a/tools/perf/profile_creators/profile_extender.py
|
| +++ b/tools/perf/profile_creators/profile_extender.py
|
| @@ -58,6 +58,18 @@ class ProfileExtender(object):
|
| def browser(self):
|
| return self._browser
|
|
|
| + def EnabledOSList(self):
|
| + """Returns a list of OSes that this extender can run on.
|
| +
|
| + Can be overridden by subclasses.
|
| +
|
| + Returns:
|
| + List of OS ('win', 'mac', or 'linux') that this extender can run on.
|
| + None if this extender can run on all platforms.
|
| + """
|
| + return None
|
| +
|
| +
|
| def SetUpBrowser(self):
|
| """Finds and starts the browser.
|
|
|
| @@ -70,6 +82,13 @@ class ProfileExtender(object):
|
| """
|
| possible_browser = self._GetPossibleBrowser(self.finder_options)
|
|
|
| + os_name = possible_browser.platform.GetOSName()
|
| + enabled_os_list = self.EnabledOSList()
|
| + if enabled_os_list is not None and os_name not in enabled_os_list:
|
| + raise NotImplementedError(
|
| + 'This profile extender on %s is not yet supported'
|
| + % os_name)
|
| +
|
| assert possible_browser.supports_tab_control
|
| assert (platform.GetHostPlatform().GetOSName() in
|
| ["win", "mac", "linux"])
|
|
|