| 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 579307defa0e12e2701ddab715efa0f88733940a..7525ef60c2aa073fc4931d9689eae74a0c88d609 100644
|
| --- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
|
| +++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
|
| @@ -34,17 +34,27 @@ class WebTrialTokenValidator;
|
| //
|
| // TODO(chasej): Link to documentation, or provide more detail on keys, .etc
|
| class CORE_EXPORT OriginTrialContext {
|
| +public:
|
| + static const char kTrialMetaTagName[];
|
| +
|
| +protected:
|
| + OriginTrialContext();
|
| + virtual ~OriginTrialContext() = default;
|
| +
|
| + virtual ExecutionContext* executionContext() = 0;
|
| + virtual Vector<String> getTokens() = 0;
|
| +
|
| private:
|
| friend class OriginTrialContextTest;
|
| friend class OriginTrials;
|
|
|
| - OriginTrialContext();
|
| -
|
| // Returns true if the feature should be considered enabled for the current
|
| // execution context. This method usually makes use of the token validator
|
| // object in the platform, but this may be overridden if a custom validator
|
| // is required (for testing, for instance).
|
| - static bool isFeatureEnabled(ExecutionContext*, const String& featureName, String* errorMessage, WebTrialTokenValidator* = nullptr);
|
| + bool isFeatureEnabled(const String& featureName, String* errorMessage, WebTrialTokenValidator* = nullptr);
|
| +
|
| + bool hasValidToken(Vector<String> tokens, const String& featureName, String* errorMessage, WebTrialTokenValidator*);
|
| };
|
|
|
| } // namespace blink
|
|
|