chromium/services/network/public/cpp/content_security_policy/csp_context.cc

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

#include "services/network/public/cpp/content_security_policy/csp_context.h"

#include "base/containers/contains.h"
#include "services/network/public/cpp/content_security_policy/content_security_policy.h"
#include "url/url_util.h"

namespace network {

namespace {

// Helper function that returns true if |policy| should be checked under
// |check_csp_disposition|.
bool ShouldCheckPolicy(const mojom::ContentSecurityPolicyPtr& policy,
                       CSPContext::CheckCSPDisposition check_csp_disposition) {}

}  // namespace

CSPContext::CSPContext() = default;
CSPContext::~CSPContext() = default;

CSPCheckResult CSPContext::IsAllowedByCsp(
    const std::vector<mojom::ContentSecurityPolicyPtr>& policies,
    mojom::CSPDirectiveName directive_name,
    const GURL& url,
    const GURL& url_before_redirects,
    bool has_followed_redirect,
    bool is_response_check,
    const mojom::SourceLocationPtr& source_location,
    CheckCSPDisposition check_csp_disposition,
    bool is_form_submission,
    bool is_opaque_fenced_frame) {}

bool CSPContext::SchemeShouldBypassCSP(std::string_view scheme) {}

void CSPContext::SanitizeDataForUseInCspViolation(
    mojom::CSPDirectiveName directive,
    GURL* blocked_url,
    network::mojom::SourceLocation* source_location) const {}

void CSPContext::ReportContentSecurityPolicyViolation(
    network::mojom::CSPViolationPtr violation) {}

}  // namespace network