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

Unified Diff: third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h

Issue 1875593003: Revert of Store the list of trial tokens in OriginTrialContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/DocumentOriginTrialContext.h
diff --git a/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h b/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h
new file mode 100644
index 0000000000000000000000000000000000000000..a45587cff6e3b5615335651fb887db145261f9ff
--- /dev/null
+++ b/third_party/WebKit/Source/core/origin_trials/DocumentOriginTrialContext.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DocumentOriginTrialContext_h
+#define DocumentOriginTrialContext_h
+
+#include "core/CoreExport.h"
+#include "core/dom/Document.h"
+#include "core/origin_trials/OriginTrialContext.h"
+#include "platform/heap/Handle.h"
+#include "wtf/Forward.h"
+#include <utility>
+
+namespace blink {
+
+class WebApiKeyValidator;
+
+// DocumentOriginTrialContext is a specialization of OriginTrialContext for
+// the Document execution context. It enables and disables feature trials based
+// on the tokens found in <meta> tags in the document header.
+class CORE_EXPORT DocumentOriginTrialContext : public OriginTrialContext {
+public:
+ explicit DocumentOriginTrialContext(Document*);
+ ~DocumentOriginTrialContext() override = default;
+
+ ExecutionContext* getExecutionContext() override { return m_parent; }
+ Vector<String> getTokens() override;
+
+ DECLARE_VIRTUAL_TRACE();
+
+protected:
+ friend class DocumentOriginTrialContextTest;
+
+private:
+ Member<Document> m_parent;
+};
+
+} // namespace blink
+
+#endif // DocumentOriginTrialContext_h

Powered by Google App Engine
This is Rietveld 408576698