#include "components/url_rewrite/browser/url_request_rewrite_rules_validation.h"
#include <string_view>
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "net/http/http_util.h"
#include "url/url_constants.h"
namespace url_rewrite {
namespace {
bool IsValidUrlHost(std::string_view host) { … }
bool ValidateAddHeaders(
const mojom::UrlRequestRewriteAddHeadersPtr& add_headers) { … }
bool ValidateRemoveHeader(
const mojom::UrlRequestRewriteRemoveHeaderPtr& remove_header) { … }
bool ValidateSubstituteQueryPattern(
const mojom::UrlRequestRewriteSubstituteQueryPatternPtr&
substitute_query_pattern) { … }
bool ValidateReplaceUrl(
const mojom::UrlRequestRewriteReplaceUrlPtr& replace_url) { … }
bool ValidateAppendToQuery(
const mojom::UrlRequestRewriteAppendToQueryPtr& append_to_query) { … }
bool ValidateRewrite(const mojom::UrlRequestActionPtr& action) { … }
}
bool ValidateRules(const mojom::UrlRequestRewriteRules* rules) { … }
}