#include "net/base/scheme_host_port_matcher_rule.h"
#include "base/strings/pattern.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "net/base/host_port_pair.h"
#include "net/base/parse_number.h"
#include "net/base/url_util.h"
#include "url/url_util.h"
namespace net {
namespace {
std::string AddBracketsIfIPv6(const IPAddress& ip_address) { … }
}
std::unique_ptr<SchemeHostPortMatcherRule>
SchemeHostPortMatcherRule::FromUntrimmedRawString(
std::string_view raw_untrimmed) { … }
bool SchemeHostPortMatcherRule::IsHostnamePatternRule() const { … }
#if !BUILDFLAG(CRONET_BUILD)
size_t SchemeHostPortMatcherRule::EstimateMemoryUsage() const { … }
#endif
SchemeHostPortMatcherHostnamePatternRule::
SchemeHostPortMatcherHostnamePatternRule(
const std::string& optional_scheme,
const std::string& hostname_pattern,
int optional_port)
: … { … }
SchemeHostPortMatcherResult SchemeHostPortMatcherHostnamePatternRule::Evaluate(
const GURL& url) const { … }
std::string SchemeHostPortMatcherHostnamePatternRule::ToString() const { … }
bool SchemeHostPortMatcherHostnamePatternRule::IsHostnamePatternRule() const { … }
std::unique_ptr<SchemeHostPortMatcherHostnamePatternRule>
SchemeHostPortMatcherHostnamePatternRule::GenerateSuffixMatchingRule() const { … }
#if !BUILDFLAG(CRONET_BUILD)
size_t SchemeHostPortMatcherHostnamePatternRule::EstimateMemoryUsage() const { … }
#endif
SchemeHostPortMatcherIPHostRule::SchemeHostPortMatcherIPHostRule(
const std::string& optional_scheme,
const IPEndPoint& ip_end_point)
: … { … }
SchemeHostPortMatcherResult SchemeHostPortMatcherIPHostRule::Evaluate(
const GURL& url) const { … }
std::string SchemeHostPortMatcherIPHostRule::ToString() const { … }
#if !BUILDFLAG(CRONET_BUILD)
size_t SchemeHostPortMatcherIPHostRule::EstimateMemoryUsage() const { … }
#endif
SchemeHostPortMatcherIPBlockRule::SchemeHostPortMatcherIPBlockRule(
const std::string& description,
const std::string& optional_scheme,
const IPAddress& ip_prefix,
size_t prefix_length_in_bits)
: … { … }
SchemeHostPortMatcherResult SchemeHostPortMatcherIPBlockRule::Evaluate(
const GURL& url) const { … }
std::string SchemeHostPortMatcherIPBlockRule::ToString() const { … }
#if !BUILDFLAG(CRONET_BUILD)
size_t SchemeHostPortMatcherIPBlockRule::EstimateMemoryUsage() const { … }
#endif
}