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

Unified Diff: Source/build/scripts/make_runtime_features.py

Issue 335453007: Introduce new runtime feature state "deprecated" and use it for showModalDialog (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/make_runtime_features.py
diff --git a/Source/build/scripts/make_runtime_features.py b/Source/build/scripts/make_runtime_features.py
index 0160b4ce3d5d3c09ce427b30fafcf65452917fb9..37fb09c891767590199bc2008707d1d4b7f8508a 100755
--- a/Source/build/scripts/make_runtime_features.py
+++ b/Source/build/scripts/make_runtime_features.py
@@ -43,7 +43,7 @@ class RuntimeFeatureWriter(in_generator.Writer):
# FIXME: valid_values and defaults should probably roll into one object.
valid_values = {
- 'status': ['stable', 'experimental', 'test'],
+ 'status': ['stable', 'experimental', 'test', 'deprecated'],
}
defaults = {
'condition' : None,
@@ -52,6 +52,10 @@ class RuntimeFeatureWriter(in_generator.Writer):
'status': None,
}
+ _status_aliases = {
+ 'deprecated': 'test',
+ }
+
def __init__(self, in_file_path):
super(RuntimeFeatureWriter, self).__init__(in_file_path)
self._outputs = {(self.class_name + '.h'): self.generate_header,
@@ -62,6 +66,7 @@ class RuntimeFeatureWriter(in_generator.Writer):
# Make sure the resulting dictionaries have all the keys we expect.
for feature in self._features:
feature['first_lowered_name'] = lower_first(feature['name'])
+ feature['status'] = self._status_aliases.get(feature['status'], feature['status'])
# Most features just check their isFooEnabled bool
# but some depend on more than one bool.
enabled_condition = 'is%sEnabled' % feature['name']
@@ -73,7 +78,7 @@ class RuntimeFeatureWriter(in_generator.Writer):
def _feature_sets(self):
# Another way to think of the status levels is as "sets of features"
# which is how we're referring to them in this generator.
- return self.valid_values['status']
+ return [status for status in self.valid_values['status'] if status not in self._status_aliases]
@template_expander.use_jinja(class_name + '.h.tmpl', filters=filters)
def generate_header(self):
« no previous file with comments | « no previous file | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698