chromium/components/optimization_guide/core/optimization_filter.cc

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

#include "components/optimization_guide/core/optimization_filter.h"

#include <string>
#include <string_view>

#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "crypto/sha2.h"
#include "url/gurl.h"

namespace optimization_guide {

namespace {

// Maximum number of suffixes to check per url.
const int kMaxSuffixCount =;

// Realistic minimum length of a host suffix.
const int kMinHostSuffix =;  // eg., abc.tv

bool MatchesRegexp(const GURL& url, const RegexpList& regexps) {}

// Returns a SHA256 hex string for the given input.
std::string SHA256(std::string_view input) {}

}  // namespace

OptimizationFilter::OptimizationFilter(
    std::unique_ptr<BloomFilter> bloom_filter,
    std::unique_ptr<RegexpList> regexps,
    std::unique_ptr<RegexpList> exclusion_regexps,
    bool skip_host_suffix_checking,
    proto::BloomFilterFormat bloom_filter_format)
    :{}

OptimizationFilter::~OptimizationFilter() = default;

bool OptimizationFilter::Matches(const GURL& url) const {}

bool OptimizationFilter::ContainsHostSuffix(const GURL& url) const {}

}  // namespace optimization_guide