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

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

Issue 1802773002: Support loading trial tokens from HTTP headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 5cad45d87a96ae41766e9728fc710756e5818cd5..ec51e8cdfcccdc10a529e90c37c3076d16dc07d0 100644
--- a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl
@@ -28,6 +28,13 @@ OriginTrials* OriginTrials::from(ExecutionContext* host)
OriginTrials::OriginTrials(ExecutionContext* host)
: OriginTrialsBase(host) {}
+// static
+void OriginTrials::setTrialTokensFromHeader(ExecutionContext* executionContext, const String& headerValue)
+{
+ if (headerValue.isEmpty()) return;
iclelland 2016/04/05 17:01:30 I don't know how much we care about formatting in
Marijn Kruisselbrink 2016/04/05 23:57:00 Yeah, was already fixed in the patch I uploaded ye
+ from(executionContext)->loadTokensFromHeader(headerValue);
+}
+
{% for feature in features %}
{% if feature.origin_trial_feature_name %}

Powered by Google App Engine
This is Rietveld 408576698