Index: third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl |
diff --git a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl |
index 5201fafe08d234a4ada14e90e4458360ad0bea21..2f16adf781b1b19f52c41d4bd00ee23aae6ebcf2 100644 |
--- a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl |
+++ b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl |
@@ -8,32 +8,14 @@ |
namespace blink { |
-namespace { |
- |
{% for feature in features %} |
{% if feature.origin_trial_feature_name %} |
-bool {{feature.first_lowered_name}}EnabledImpl(ExecutionContext* executionContext, String* errorMessage) { |
+bool OriginTrials::{{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext) { |
if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled()) |
return true; |
- OriginTrialContext* context = OriginTrialContext::from(executionContext); |
- return context->isFeatureEnabled("{{feature.origin_trial_feature_name}}", errorMessage); |
-} |
- |
-{% endif %} |
-{% endfor %} |
- |
-} // namespace |
- |
-{% for feature in features %} |
-{% if feature.origin_trial_feature_name %} |
- |
-bool OriginTrials::{{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext, String& errorMessage) { |
- return {{feature.first_lowered_name}}EnabledImpl(executionContext, &errorMessage); |
-} |
- |
-bool OriginTrials::{{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext) { |
- return {{feature.first_lowered_name}}EnabledImpl(executionContext, nullptr); |
+ OriginTrialContext* context = OriginTrialContext::from(executionContext, OriginTrialContext::DontCreateIfNotExists); |
+ return context && context->isFeatureEnabled("{{feature.origin_trial_feature_name}}"); |
} |
{% endif %} |