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

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

Issue 2249043002: Disable WebShare on platforms other than android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 2 months 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/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 2f16adf781b1b19f52c41d4bd00ee23aae6ebcf2..3d14090f1928c2368d1227d5892c998e61d4ac28 100644
--- a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl
@@ -14,8 +14,21 @@ namespace blink {
bool OriginTrials::{{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext) {
if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled())
return true;
+{% if feature.origin_trial_os %}
+#if
+{%- for os in feature.origin_trial_os %}
+{%- if not loop.first %} ||{% endif %}
+ defined(OS_{{os | upper}})
+{%- endfor %}
+{% endif %}
+
OriginTrialContext* context = OriginTrialContext::from(executionContext, OriginTrialContext::DontCreateIfNotExists);
return context && context->isFeatureEnabled("{{feature.origin_trial_feature_name}}");
+{% if feature.origin_trial_os %}
+#else
+ return false;
+#endif
+{% endif %}
}
{% endif %}

Powered by Google App Engine
This is Rietveld 408576698