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

Side by Side 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 unified diff | Download patch
OLDNEW
1 {% from 'macros.tmpl' import license %} 1 {% from 'macros.tmpl' import license %}
2 {{license()}} 2 {{license()}}
3 3
4 #include "core/origin_trials/OriginTrials.h" 4 #include "core/origin_trials/OriginTrials.h"
5 5
6 #include "core/origin_trials/OriginTrialContext.h" 6 #include "core/origin_trials/OriginTrialContext.h"
7 #include "platform/RuntimeEnabledFeatures.h" 7 #include "platform/RuntimeEnabledFeatures.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 {% for feature in features %} 11 {% for feature in features %}
12 {% if feature.origin_trial_feature_name %} 12 {% if feature.origin_trial_feature_name %}
13 13
14 bool OriginTrials::{{feature.first_lowered_name}}Enabled(ExecutionContext* execu tionContext) { 14 bool OriginTrials::{{feature.first_lowered_name}}Enabled(ExecutionContext* execu tionContext) {
15 if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled()) 15 if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled())
16 return true; 16 return true;
17 {% if feature.origin_trial_os_whitelist %}
18 #if
19 {%- for os in feature.origin_trial_os_whitelist %}
20 {%- if not loop.first %} ||{% endif %}
21 defined(OS_{{os | upper}})
22 {%- endfor %}
23 {% endif %}
24
17 OriginTrialContext* context = OriginTrialContext::from(executionContext, Ori ginTrialContext::DontCreateIfNotExists); 25 OriginTrialContext* context = OriginTrialContext::from(executionContext, Ori ginTrialContext::DontCreateIfNotExists);
18 return context && context->isFeatureEnabled("{{feature.origin_trial_feature_ name}}"); 26 return context && context->isFeatureEnabled("{{feature.origin_trial_feature_ name}}");
27 {% if feature.origin_trial_os_whitelist %}
28 #else
29 return false;
30 #endif
31 {% endif %}
19 } 32 }
20 33
21 {% endif %} 34 {% endif %}
22 {% endfor %} 35 {% endfor %}
23 36
24 } // namespace blink 37 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698