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

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

Issue 1541983003: Force all experiment enabled checks to use ExperimentalFeatures (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl
index 95ff1ea3fec19aa60efae39ae96531a5d789ce75..3c85538b4553a608fc2b3dc743b5c4f9c2302aa2 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl
@@ -12,9 +12,27 @@ namespace blink {
// static
bool ExperimentalFeatures::{{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext, String& errorMessage) {
+ return {{feature.first_lowered_name}}EnabledImpl(executionContext, &errorMessage);
+}
+
+// static
+bool ExperimentalFeatures::{{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext) {
+ return {{feature.first_lowered_name}}EnabledImpl(executionContext, nullptr);
+}
+{% endif %}
+{% endfor %}
+
+{% for feature in features %}
+{% if feature.api_name %}
+
+// static
+bool ExperimentalFeatures::{{feature.first_lowered_name}}EnabledImpl(ExecutionContext* executionContext, String* errorMessage) {
if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled())
return true;
- return Experiments::isApiEnabled(executionContext, "{{feature.api_name}}", errorMessage);
+ if (errorMessage) {
iclelland 2015/12/23 03:56:12 See the comment in Experiments.cpp -- it seems wro
chasej 2015/12/23 15:58:24 Yes, I agree it would be better to call directly i
+ return Experiments::isApiEnabled(executionContext, "{{feature.api_name}}", *errorMessage);
+ }
+ return Experiments::isApiEnabled(executionContext, "{{feature.api_name}}");
}
{% endif %}
{% endfor %}

Powered by Google App Engine
This is Rietveld 408576698