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

Unified Diff: tools/telemetry/telemetry/page/profile_creator.py

Issue 825703003: Change profile_creator to not subclass page_test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@telemetry_profile_generation
Patch Set: Rebase against top of tree. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/page/profile_creator.py
diff --git a/tools/telemetry/telemetry/page/profile_creator.py b/tools/telemetry/telemetry/page/profile_creator.py
index 8def468f09406e2f3335fb84c007c35150f6c0c3..7b94494b2424e5b98f941a99f4cbf2b860df4fe3 100644
--- a/tools/telemetry/telemetry/page/profile_creator.py
+++ b/tools/telemetry/telemetry/page/profile_creator.py
@@ -4,17 +4,22 @@
from telemetry.page import page_test
+class ProfileCreator(object):
+ """Abstract base class for an object that constructs a Chrome profile."""
-class ProfileCreator(page_test.PageTest):
- """Base class for an object that constructs a Chrome profile."""
+ def Run(self, options):
+ """Creates the profile.
- def __init__(self):
- super(ProfileCreator, self).__init__()
- self._page_set = None
+ |options| is an instance of BrowserFinderOptions. When subclass
+ implementations of this method inevitably attempt to find and launch a
+ browser, they should pass |options| to the relevant methods.
- @property
- def page_set(self):
- return self._page_set
-
- def ValidateAndMeasurePage(self, _, tab, results):
- pass
+ Several properties of |options| might require direct manipulation by
+ subclasses. These are:
+ |options.output_profile_path|: The path at which the profile should be
+ created.
+ |options.browser_options.profile_dir|: If this property is None, then a
+ new profile is created. Otherwise, the existing profile is appended on
+ to.
+ """
+ raise NotImplementedError()
« no previous file with comments | « tools/perf/profile_creators/small_profile_creator.py ('k') | tools/telemetry/telemetry/page/profile_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698