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

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: Created 6 years 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..30877c9c48a3304783c482cbd2b2688edfe9e929 100644
--- a/tools/telemetry/telemetry/page/profile_creator.py
+++ b/tools/telemetry/telemetry/page/profile_creator.py
@@ -4,17 +4,25 @@
from telemetry.page import page_test
-
-class ProfileCreator(page_test.PageTest):
+class ProfileCreator(object):
"""Base class for an object that constructs a Chrome profile."""
def __init__(self):
- super(ProfileCreator, self).__init__()
- self._page_set = None
+ pass
dtu 2015/01/09 01:23:58 not needed
erikchen 2015/01/09 03:12:42 Removed.
+
+ def Run(self, options):
+ """Creates the profile.
- @property
- def page_set(self):
- return self._page_set
+ |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.
- def ValidateAndMeasurePage(self, _, tab, results):
+ 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.
+ """
pass
dtu 2015/01/09 01:23:58 This is an abstract class, right? raise NotImpleme
erikchen 2015/01/09 03:12:42 Done.

Powered by Google App Engine
This is Rietveld 408576698