summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/fetch/trust_token_issuance_authorization.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/fetch/trust_token_issuance_authorization.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/fetch/trust_token_issuance_authorization.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/fetch/trust_token_issuance_authorization.cc b/chromium/third_party/blink/renderer/core/fetch/trust_token_issuance_authorization.cc
new file mode 100644
index 00000000000..1d829f8c942
--- /dev/null
+++ b/chromium/third_party/blink/renderer/core/fetch/trust_token_issuance_authorization.cc
@@ -0,0 +1,18 @@
+// Copyright 2020 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.
+
+#include "third_party/blink/renderer/core/fetch/trust_token_issuance_authorization.h"
+
+#include "third_party/blink/renderer/core/execution_context/execution_context.h"
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+
+namespace blink {
+
+bool IsTrustTokenIssuanceAvailableInExecutionContext(
+ const ExecutionContext& context) {
+ return context.FeatureEnabled(OriginTrialFeature::kTrustTokens) ||
+ RuntimeEnabledFeatures::TrustTokensAlwaysAllowIssuanceEnabled();
+}
+
+} // namespace blink