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

Unified Diff: tools/cr/cr/plugin.py

Issue 116363002: [cr tool] Fixing import problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the place we hook late detection from Created 6 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
« no previous file with comments | « tools/cr/cr/commands/sync.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cr/cr/plugin.py
diff --git a/tools/cr/cr/plugin.py b/tools/cr/cr/plugin.py
index 05a02cb1b1924a88b6040474be366288efbe2cab..eccd86954aa44abed7249fe8b5677d5b69b78583 100644
--- a/tools/cr/cr/plugin.py
+++ b/tools/cr/cr/plugin.py
@@ -182,6 +182,10 @@ class Plugin(cr.loader.AutoExport):
getattr(self, config_root.property_name).enabled = False
@classmethod
+ def ClassInit(cls):
+ pass
+
+ @classmethod
def GetInstance(cls):
"""Gets an instance of this plugin.
@@ -193,6 +197,8 @@ class Plugin(cr.loader.AutoExport):
"""
plugin = _plugins.get(cls, None)
if plugin is None:
+ # Run delayed class initialization
+ cls.ClassInit()
# Build a new instance of cls, and register it as the main instance.
plugin = cls()
_plugins[cls] = plugin
« no previous file with comments | « tools/cr/cr/commands/sync.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698