Chromium Code Reviews| Index: third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h |
| diff --git a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h |
| index 1b4b6772a2957519e527e8b250413092b5d323fa..7f29843ee01b8eaed2237d98908e6813707d4147 100644 |
| --- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h |
| +++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h |
| @@ -39,6 +39,14 @@ public: |
| static const char* supplementName(); |
| static OriginTrialContext* from(ExecutionContext*); |
| + // Parses an Origin-Trial header as specified in |
| + // https://jpchase.github.io/OriginTrials/#header into individual tokens. |
| + // Returns null if the header value was malformed and could not be parsed. |
| + // If the header does not contain any tokens, this returns an empty vector. |
| + static std::unique_ptr<Vector<String>> parseHeaderValue(const String& headerValue); |
|
Nate Chapin
2016/04/21 22:09:10
Is this public only for testing? If so, can we add
Marijn Kruisselbrink
2016/04/21 22:22:47
It's also public because in a follow-up patch (htt
Nate Chapin
2016/04/21 22:25:56
Makes sense.
|
| + |
| + static void addTokensFromHeader(ExecutionContext*, const String& headerValue); |
| + |
| void addToken(const String& token); |
| // Returns true if the feature should be considered enabled for the current |