OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (C) 2013 Google Inc. All rights reserved. | 2 # Copyright (C) 2013 Google Inc. All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... | |
36 | 36 |
37 | 37 |
38 class RuntimeFeatureWriter(in_generator.Writer): | 38 class RuntimeFeatureWriter(in_generator.Writer): |
39 class_name = 'RuntimeEnabledFeatures' | 39 class_name = 'RuntimeEnabledFeatures' |
40 | 40 |
41 # FIXME: valid_values and defaults should probably roll into one object. | 41 # FIXME: valid_values and defaults should probably roll into one object. |
42 valid_values = { | 42 valid_values = { |
43 'status': ['stable', 'experimental', 'test'], | 43 'status': ['stable', 'experimental', 'test'], |
44 } | 44 } |
45 defaults = { | 45 defaults = { |
46 'origin_trial_feature_name': None, | 46 'origin_trial_feature_name': None, |
haraken
2016/08/17 01:18:43
Would you sort this dictionary in the alphabetical
iclelland
2016/08/17 13:25:55
Done.
| |
47 'feature_policy': None, | |
47 'condition': None, | 48 'condition': None, |
48 'implied_by': [], | 49 'implied_by': [], |
49 'depends_on': [], | 50 'depends_on': [], |
50 'custom': False, | 51 'custom': False, |
51 'status': None, | 52 'status': None, |
52 'settable_from_internals': False, | 53 'settable_from_internals': False, |
53 } | 54 } |
54 | 55 |
55 def __init__(self, in_file_path): | 56 def __init__(self, in_file_path): |
56 super(RuntimeFeatureWriter, self).__init__(in_file_path) | 57 super(RuntimeFeatureWriter, self).__init__(in_file_path) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 def generate_header(self): | 90 def generate_header(self): |
90 return self._template_inputs() | 91 return self._template_inputs() |
91 | 92 |
92 @template_expander.use_jinja(class_name + '.cpp.tmpl') | 93 @template_expander.use_jinja(class_name + '.cpp.tmpl') |
93 def generate_implementation(self): | 94 def generate_implementation(self): |
94 return self._template_inputs() | 95 return self._template_inputs() |
95 | 96 |
96 | 97 |
97 if __name__ == '__main__': | 98 if __name__ == '__main__': |
98 in_generator.Maker(RuntimeFeatureWriter).main(sys.argv) | 99 in_generator.Maker(RuntimeFeatureWriter).main(sys.argv) |
OLD | NEW |