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

Unified Diff: third_party/WebKit/Source/core/origin_trials/OriginTrialsBase.cpp

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/core/origin_trials/OriginTrialsBase.cpp
diff --git a/third_party/WebKit/Source/core/origin_trials/OriginTrialsBase.cpp b/third_party/WebKit/Source/core/origin_trials/OriginTrialsBase.cpp
index 2c13003ab0cee7f233afe2ebfd7e877a55263f56..5feaa2ba6dabf3c57b5f536ab52eb27cdeb67cb5 100644
--- a/third_party/WebKit/Source/core/origin_trials/OriginTrialsBase.cpp
+++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialsBase.cpp
@@ -35,6 +35,14 @@ void OriginTrialsBase::addToken(const String& token)
m_tokens.append(token);
}
+void OriginTrialsBase::loadTokensFromHeader(const String& headerValue)
+{
+ Vector<String> headers;
+ headerValue.split(',', headers);
iclelland 2016/04/05 17:01:30 Is there a method which takes into account quoted
Marijn Kruisselbrink 2016/04/05 23:57:00 Ah, good point. In the spec I started writing I ev
+ for (const String& header : headers)
+ addToken(header.stripWhiteSpace());
+}
+
DEFINE_TRACE(OriginTrialsBase)
{
visitor->trace(m_host);

Powered by Google App Engine
This is Rietveld 408576698