#include "extensions/browser/api/declarative_net_request/request_action.h"
#include <tuple>
#include <utility>
#include "extensions/browser/api/declarative_net_request/flat/extension_ruleset_generated.h"
#include "extensions/browser/api/declarative_net_request/utils.h"
namespace extensions::declarative_net_request {
namespace {
dnr_api;
dnr_api::HeaderOperation ConvertFlatHeaderOperation(
flat::HeaderOperation operation) { … }
}
RequestAction::HeaderInfo::HeaderInfo(std::string header,
dnr_api::HeaderOperation operation,
std::optional<std::string> value)
: … { … }
RequestAction::HeaderInfo::HeaderInfo(const flat::ModifyHeaderInfo& info)
: … { … }
RequestAction::HeaderInfo::~HeaderInfo() = default;
RequestAction::HeaderInfo::HeaderInfo(const RequestAction::HeaderInfo& other) =
default;
RequestAction::HeaderInfo& RequestAction::HeaderInfo::operator=(
const RequestAction::HeaderInfo& other) = default;
RequestAction::HeaderInfo::HeaderInfo(RequestAction::HeaderInfo&&) = default;
RequestAction::HeaderInfo& RequestAction::HeaderInfo::operator=(
RequestAction::HeaderInfo&&) = default;
RequestAction::RequestAction(RequestAction::Type type,
uint32_t rule_id,
uint64_t index_priority,
RulesetID ruleset_id,
const ExtensionId& extension_id)
: … { … }
RequestAction::~RequestAction() = default;
RequestAction::RequestAction(RequestAction&&) = default;
RequestAction& RequestAction::operator=(RequestAction&&) = default;
RequestAction RequestAction::Clone() const { … }
RequestAction::RequestAction(const RequestAction&) = default;
bool operator<(const RequestAction& lhs, const RequestAction& rhs) { … }
bool operator>(const RequestAction& lhs, const RequestAction& rhs) { … }
std::optional<RequestAction> GetMaxPriorityAction(
std::optional<RequestAction> lhs,
std::optional<RequestAction> rhs) { … }
}