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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl

Issue 1538663003: Add code generation for ExperimentalFeatures class from RuntimeEnabledFeatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 {% from 'macros.tmpl' import license %}
2 {{license()}}
3
4 #include "config.h"
jbroman 2015/12/21 15:03:51 warning: config.h will go away soon (https://code.
iclelland 2015/12/21 17:17:24 Acknowledged, thanks - I'll keep an eye on that.
5 #include "core/experiments/ExperimentalFeatures.h"
6
7 #include "core/experiments/Experiments.h"
8 #include "platform/RuntimeEnabledFeatures.h"
9
10 namespace blink {
11 {% for feature in features %}
12 {% if feature.api_name %}
13
14 // static
15 bool ExperimentalFeatures::{{feature.first_lowered_name}}Enabled(ExecutionContex t* executionContext, String& errorMessage) {
16 if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled())
17 return true;
18 return Experiments::isApiEnabled(executionContext, "{{feature.api_name}}", e rrorMessage);
19 }
20 {% endif %}
21 {% endfor %}
22
23 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698