| 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..1648f509422de64a654c988ce962c02af2472bd4 100644
|
| --- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
|
| +++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h
|
| @@ -6,12 +6,12 @@
|
| #define OriginTrialContext_h
|
|
|
| #include "core/CoreExport.h"
|
| -#include "core/dom/DOMException.h"
|
| -#include "core/dom/ExecutionContext.h"
|
| -#include "wtf/text/WTFString.h"
|
| +#include "wtf/Forward.h"
|
| +#include "wtf/Vector.h"
|
|
|
| namespace blink {
|
|
|
| +class ExecutionContext;
|
| class WebTrialTokenValidator;
|
|
|
| // The Experimental Framework (EF) provides limited access to experimental
|
| @@ -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
|
|
|