Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {{license()}} | 2 {{license()}} |
| 3 | 3 |
| 4 #include "core/experiments/ExperimentalFeatures.h" | 4 #include "core/experiments/ExperimentalFeatures.h" |
| 5 | 5 |
| 6 #include "core/experiments/Experiments.h" | 6 #include "core/experiments/Experiments.h" |
| 7 #include "platform/RuntimeEnabledFeatures.h" | 7 #include "platform/RuntimeEnabledFeatures.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 {% for feature in features %} | 10 {% for feature in features %} |
| 11 {% if feature.api_name %} | 11 {% if feature.api_name %} |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 bool ExperimentalFeatures::{{feature.first_lowered_name}}Enabled(ExecutionContex t* executionContext, String& errorMessage) { | 14 bool ExperimentalFeatures::{{feature.first_lowered_name}}Enabled(ExecutionContex t* executionContext, String& errorMessage) { |
| 15 return {{feature.first_lowered_name}}EnabledImpl(executionContext, &errorMes sage); | |
| 16 } | |
| 17 | |
| 18 // static | |
| 19 bool ExperimentalFeatures::{{feature.first_lowered_name}}Enabled(ExecutionContex t* executionContext) { | |
| 20 return {{feature.first_lowered_name}}EnabledImpl(executionContext, nullptr); | |
| 21 } | |
| 22 {% endif %} | |
| 23 {% endfor %} | |
|
iclelland
2016/01/08 15:11:28
Why the separate loop? Couldn't the next function
chasej
2016/01/08 17:37:06
The separate for loops are to match the declaratio
iclelland
2016/01/08 17:59:38
Acknowledged.
| |
| 24 | |
| 25 {% for feature in features %} | |
| 26 {% if feature.api_name %} | |
| 27 | |
| 28 // static | |
| 29 bool ExperimentalFeatures::{{feature.first_lowered_name}}EnabledImpl(ExecutionCo ntext* executionContext, String* errorMessage) { | |
| 15 if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled()) | 30 if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled()) |
| 16 return true; | 31 return true; |
| 17 return Experiments::isApiEnabled(executionContext, "{{feature.api_name}}", e rrorMessage); | 32 return Experiments::isApiEnabled(executionContext, "{{feature.api_name}}", e rrorMessage); |
| 18 } | 33 } |
| 19 {% endif %} | 34 {% endif %} |
| 20 {% endfor %} | 35 {% endfor %} |
| 21 | 36 |
| 22 } // namespace blink | 37 } // namespace blink |
| OLD | NEW |