chromium/third_party/blink/common/permissions_policy/document_policy.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/public/common/permissions_policy/document_policy.h"

#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "net/http/structured_headers.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom.h"

namespace blink {

// static
std::unique_ptr<DocumentPolicy> DocumentPolicy::CreateWithHeaderPolicy(
    const ParsedDocumentPolicy& header_policy) {}

// static
std::unique_ptr<DocumentPolicy> DocumentPolicy::CopyStateFrom(
    const DocumentPolicy* source) {}

namespace {
net::structured_headers::Item PolicyValueToItem(const PolicyValue& value) {}

}  // namespace

// static
std::optional<std::string> DocumentPolicy::Serialize(
    const DocumentPolicyFeatureState& policy) {}

// static
std::optional<std::string> DocumentPolicy::SerializeInternal(
    const DocumentPolicyFeatureState& policy,
    const DocumentPolicyFeatureInfoMap& feature_info_map) {}

// static
DocumentPolicyFeatureState DocumentPolicy::MergeFeatureState(
    const DocumentPolicyFeatureState& base_policy,
    const DocumentPolicyFeatureState& override_policy) {}

bool DocumentPolicy::IsFeatureEnabled(
    mojom::DocumentPolicyFeature feature) const {}

bool DocumentPolicy::IsFeatureEnabled(
    mojom::DocumentPolicyFeature feature,
    const PolicyValue& threshold_value) const {}

PolicyValue DocumentPolicy::GetFeatureValue(
    mojom::DocumentPolicyFeature feature) const {}

const std::optional<std::string> DocumentPolicy::GetFeatureEndpoint(
    mojom::DocumentPolicyFeature feature) const {}

void DocumentPolicy::UpdateFeatureState(
    const DocumentPolicyFeatureState& feature_state) {}

DocumentPolicy::DocumentPolicy(const DocumentPolicyFeatureState& header_policy,
                               const FeatureEndpointMap& endpoint_map,
                               const DocumentPolicyFeatureState& defaults)
    :{}

// static
std::unique_ptr<DocumentPolicy> DocumentPolicy::CreateWithHeaderPolicy(
    const DocumentPolicyFeatureState& header_policy,
    const FeatureEndpointMap& endpoint_map,
    const DocumentPolicyFeatureState& defaults) {}

// static
bool DocumentPolicy::IsPolicyCompatible(
    const DocumentPolicyFeatureState& required_policy,
    const DocumentPolicyFeatureState& incoming_policy) {}

}  // namespace blink