#include "components/subresource_filter/tools/rule_parser/rule.h"
#include <stddef.h>
#include <algorithm>
#include <utility>
#include "base/check_op.h"
#include "base/logging.h"
#include "base/not_fatal_until.h"
#include "base/strings/string_util.h"
namespace subresource_filter {
namespace {
UrlPatternType GetUrlPatternType(const UrlRule& rule) { … }
void DomainListJoin(const google::protobuf::RepeatedPtrField<
url_pattern_index::proto::DomainListItem>& domain_list,
char separator,
std::string* output) { … }
}
UrlRule::UrlRule() = default;
UrlRule::UrlRule(const UrlRule&) = default;
UrlRule::~UrlRule() = default;
UrlRule& UrlRule::operator=(const UrlRule&) = default;
bool UrlRule::operator==(const UrlRule& other) const { … }
url_pattern_index::proto::UrlRule UrlRule::ToProtobuf() const { … }
void UrlRule::Canonicalize() { … }
CssRule::CssRule() = default;
CssRule::CssRule(const CssRule&) = default;
CssRule::~CssRule() = default;
CssRule& CssRule::operator=(const CssRule&) = default;
bool CssRule::operator==(const CssRule& other) const { … }
url_pattern_index::proto::CssRule CssRule::ToProtobuf() const { … }
void CssRule::Canonicalize() { … }
void UrlRule::CanonicalizeUrlPattern() { … }
void CanonicalizeDomainList(std::vector<std::string>* domains) { … }
std::string ToString(const url_pattern_index::proto::UrlRule& rule) { … }
std::string ToString(const url_pattern_index::proto::CssRule& rule) { … }
std::ostream& operator<<(std::ostream& os, const UrlRule& rule) { … }
std::ostream& operator<<(std::ostream& os, const CssRule& rule) { … }
}