//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/net/PHttpBackgroundChannelChild.h"
#include "mozilla/AntiTrackingIPCUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/FeaturePolicyUtils.h"
#include "mozilla/dom/FetchIPCTypes.h"
#include "mozilla/dom/NavigationAPIIPCUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/SessionHistoryEntry.h"
#include "mozilla/ipc/TransportSecurityInfoUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/net/CacheInfoIPCTypes.h"
#include "mozilla/net/ClassOfService.h"
#include "mozilla/net/HttpBackgroundChannelChild.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "nsDOMNavigationTiming.h"
#include "nsDocShellLoadState.h"
#include "nsHttp.h"
#include "nsHttpHeaderArray.h"
#include "nsHttpResponseHead.h"
#include "nsIPropertyBag2.h"
#include "nsIReferrerInfo.h"
#include "nsITransportSecurityInfo.h"
#include "nsIURI.h"

#include "mozilla/ipc/PBackgroundChild.h"
#include "mozilla/extensions/PStreamFilterChild.h"

#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"

namespace mozilla {
namespace net {


auto PHttpBackgroundChannelChild::Recv__delete__() -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

MOZ_IMPLICIT PHttpBackgroundChannelChild::PHttpBackgroundChannelChild() :
    mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
    MOZ_COUNT_CTOR(PHttpBackgroundChannelChild);
}

PHttpBackgroundChannelChild::~PHttpBackgroundChannelChild()
{
    MOZ_COUNT_DTOR(PHttpBackgroundChannelChild);
}

auto PHttpBackgroundChannelChild::ActorAlloc() -> void
{
    AddRef();
}

auto PHttpBackgroundChannelChild::ActorDealloc() -> void
{
    Release();
}

auto PHttpBackgroundChannelChild::OtherPid() const -> ::base::ProcessId
{
    ::base::ProcessId pid =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
    MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
    return pid;
}

auto PHttpBackgroundChannelChild::OtherChildID() const -> ::GeckoChildID
{
    ::GeckoChildID childID =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
    MOZ_RELEASE_ASSERT(childID != -1);
    return childID;
}

auto PHttpBackgroundChannelChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
    return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}

auto PHttpBackgroundChannelChild::Manager() const -> PBackgroundChild*
{
    return static_cast<PBackgroundChild*>(IProtocol::Manager());
}

auto PHttpBackgroundChannelChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    return {};
}

auto PHttpBackgroundChannelChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    default:
        return nullptr;
    }
}

auto PHttpBackgroundChannelChild::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PHttpBackgroundChannelChild::OnMessageReceived(const Message& msg__) -> PHttpBackgroundChannelChild::Result
{
    switch (msg__.type()) {
    case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            return MsgProcessed;
        }
    case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            this->ActorDisconnected(ManagedEndpointDropped);
            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_OnStartRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnStartRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__responseHead = IPC::ReadParam<nsHttpResponseHead>((&(reader__)));
            if (!maybe__responseHead) {
                FatalError("Error deserializing 'nsHttpResponseHead'");
                return MsgValueError;

            }
            auto& responseHead = *maybe__responseHead;
            // Sentinel = 'responseHead'
            if ((!(((&(reader__)))->ReadSentinel(549651682)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsHttpResponseHead'");
                return MsgValueError;
            }
            auto maybe__useResponseHead = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__useResponseHead) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& useResponseHead = *maybe__useResponseHead;
            // Sentinel = 'useResponseHead'
            if ((!(((&(reader__)))->ReadSentinel(831260175)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__requestHeaders = IPC::ReadParam<nsHttpHeaderArray>((&(reader__)));
            if (!maybe__requestHeaders) {
                FatalError("Error deserializing 'nsHttpHeaderArray'");
                return MsgValueError;

            }
            auto& requestHeaders = *maybe__requestHeaders;
            // Sentinel = 'requestHeaders'
            if ((!(((&(reader__)))->ReadSentinel(732693958)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsHttpHeaderArray'");
                return MsgValueError;
            }
            auto maybe__args = IPC::ReadParam<HttpChannelOnStartRequestArgs>((&(reader__)));
            if (!maybe__args) {
                FatalError("Error deserializing 'HttpChannelOnStartRequestArgs'");
                return MsgValueError;

            }
            auto& args = *maybe__args;
            // Sentinel = 'args'
            if ((!(((&(reader__)))->ReadSentinel(69140910)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'HttpChannelOnStartRequestArgs'");
                return MsgValueError;
            }
            auto maybe__altData = IPC::ReadParam<HttpChannelAltDataStream>((&(reader__)));
            if (!maybe__altData) {
                FatalError("Error deserializing 'HttpChannelAltDataStream'");
                return MsgValueError;

            }
            auto& altData = *maybe__altData;
            // Sentinel = 'altData'
            if ((!(((&(reader__)))->ReadSentinel(183894716)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'HttpChannelAltDataStream'");
                return MsgValueError;
            }
            auto maybe__onStartRequestStart = IPC::ReadParam<TimeStamp>((&(reader__)));
            if (!maybe__onStartRequestStart) {
                FatalError("Error deserializing 'TimeStamp'");
                return MsgValueError;

            }
            auto& onStartRequestStart = *maybe__onStartRequestStart;
            // Sentinel = 'onStartRequestStart'
            if ((!(((&(reader__)))->ReadSentinel(1313015779)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'TimeStamp'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvOnStartRequest(std::move(responseHead), std::move(useResponseHead), std::move(requestHeaders), std::move(args), std::move(altData), std::move(onStartRequestStart));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_OnTransportAndData__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnTransportAndData", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__channelStatus = IPC::ReadParam<nsresult>((&(reader__)));
            if (!maybe__channelStatus) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;

            }
            auto& channelStatus = *maybe__channelStatus;
            // Sentinel = 'channelStatus'
            if ((!(((&(reader__)))->ReadSentinel(618136926)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            auto maybe__transportStatus = IPC::ReadParam<nsresult>((&(reader__)));
            if (!maybe__transportStatus) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;

            }
            auto& transportStatus = *maybe__transportStatus;
            // Sentinel = 'transportStatus'
            if ((!(((&(reader__)))->ReadSentinel(865273458)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            auto maybe__offset = IPC::ReadParam<uint64_t>((&(reader__)));
            if (!maybe__offset) {
                FatalError("Error deserializing 'uint64_t'");
                return MsgValueError;

            }
            auto& offset = *maybe__offset;
            // Sentinel = 'offset'
            if ((!(((&(reader__)))->ReadSentinel(147653256)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            auto maybe__count = IPC::ReadParam<uint32_t>((&(reader__)));
            if (!maybe__count) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& count = *maybe__count;
            // Sentinel = 'count'
            if ((!(((&(reader__)))->ReadSentinel(106889770)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            auto maybe__data = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__data) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& data = *maybe__data;
            // Sentinel = 'data'
            if ((!(((&(reader__)))->ReadSentinel(67109275)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            auto maybe__dataFromSocketProcess = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__dataFromSocketProcess) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& dataFromSocketProcess = *maybe__dataFromSocketProcess;
            // Sentinel = 'dataFromSocketProcess'
            if ((!(((&(reader__)))->ReadSentinel(1537869943)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__onDataAvailableStart = IPC::ReadParam<TimeStamp>((&(reader__)));
            if (!maybe__onDataAvailableStart) {
                FatalError("Error deserializing 'TimeStamp'");
                return MsgValueError;

            }
            auto& onDataAvailableStart = *maybe__onDataAvailableStart;
            // Sentinel = 'onDataAvailableStart'
            if ((!(((&(reader__)))->ReadSentinel(1369049063)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'TimeStamp'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvOnTransportAndData(std::move(channelStatus), std::move(transportStatus), std::move(offset), std::move(count), std::move(data), std::move(dataFromSocketProcess), std::move(onDataAvailableStart));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_OnStopRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnStopRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__channelStatus = IPC::ReadParam<nsresult>((&(reader__)));
            if (!maybe__channelStatus) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;

            }
            auto& channelStatus = *maybe__channelStatus;
            // Sentinel = 'channelStatus'
            if ((!(((&(reader__)))->ReadSentinel(618136926)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            auto maybe__timing = IPC::ReadParam<ResourceTimingStructArgs>((&(reader__)));
            if (!maybe__timing) {
                FatalError("Error deserializing 'ResourceTimingStructArgs'");
                return MsgValueError;

            }
            auto& timing = *maybe__timing;
            // Sentinel = 'timing'
            if ((!(((&(reader__)))->ReadSentinel(150798985)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ResourceTimingStructArgs'");
                return MsgValueError;
            }
            auto maybe__lastActiveTabOptimization = IPC::ReadParam<TimeStamp>((&(reader__)));
            if (!maybe__lastActiveTabOptimization) {
                FatalError("Error deserializing 'TimeStamp'");
                return MsgValueError;

            }
            auto& lastActiveTabOptimization = *maybe__lastActiveTabOptimization;
            // Sentinel = 'lastActiveTabOptimization'
            if ((!(((&(reader__)))->ReadSentinel(2190412335)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'TimeStamp'");
                return MsgValueError;
            }
            auto maybe__responseTrailers = IPC::ReadParam<nsHttpHeaderArray>((&(reader__)));
            if (!maybe__responseTrailers) {
                FatalError("Error deserializing 'nsHttpHeaderArray'");
                return MsgValueError;

            }
            auto& responseTrailers = *maybe__responseTrailers;
            // Sentinel = 'responseTrailers'
            if ((!(((&(reader__)))->ReadSentinel(961873590)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsHttpHeaderArray'");
                return MsgValueError;
            }
            auto maybe__consoleReport = IPC::ReadParam<nsTArray<ConsoleReportCollected>>((&(reader__)));
            if (!maybe__consoleReport) {
                FatalError("Error deserializing 'ConsoleReportCollected[]'");
                return MsgValueError;

            }
            auto& consoleReport = *maybe__consoleReport;
            // Sentinel = 'consoleReport'
            if ((!(((&(reader__)))->ReadSentinel(634652016)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ConsoleReportCollected[]'");
                return MsgValueError;
            }
            auto maybe__fromSocketProcess = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__fromSocketProcess) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& fromSocketProcess = *maybe__fromSocketProcess;
            // Sentinel = 'fromSocketProcess'
            if ((!(((&(reader__)))->ReadSentinel(1049626365)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__onStopRequestStart = IPC::ReadParam<TimeStamp>((&(reader__)));
            if (!maybe__onStopRequestStart) {
                FatalError("Error deserializing 'TimeStamp'");
                return MsgValueError;

            }
            auto& onStopRequestStart = *maybe__onStopRequestStart;
            // Sentinel = 'onStopRequestStart'
            if ((!(((&(reader__)))->ReadSentinel(1183909755)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'TimeStamp'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvOnStopRequest(std::move(channelStatus), std::move(timing), std::move(lastActiveTabOptimization), std::move(responseTrailers), std::move(consoleReport), std::move(fromSocketProcess), std::move(onStopRequestStart));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_OnConsoleReport__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnConsoleReport", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__consoleReport = IPC::ReadParam<nsTArray<ConsoleReportCollected>>((&(reader__)));
            if (!maybe__consoleReport) {
                FatalError("Error deserializing 'ConsoleReportCollected[]'");
                return MsgValueError;

            }
            auto& consoleReport = *maybe__consoleReport;
            // Sentinel = 'consoleReport'
            if ((!(((&(reader__)))->ReadSentinel(634652016)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ConsoleReportCollected[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvOnConsoleReport(std::move(consoleReport));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_OnProgress__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnProgress", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__progress = IPC::ReadParam<int64_t>((&(reader__)));
            if (!maybe__progress) {
                FatalError("Error deserializing 'int64_t'");
                return MsgValueError;

            }
            auto& progress = *maybe__progress;
            // Sentinel = 'progress'
            if ((!(((&(reader__)))->ReadSentinel(261292918)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'");
                return MsgValueError;
            }
            auto maybe__progressMax = IPC::ReadParam<int64_t>((&(reader__)));
            if (!maybe__progressMax) {
                FatalError("Error deserializing 'int64_t'");
                return MsgValueError;

            }
            auto& progressMax = *maybe__progressMax;
            // Sentinel = 'progressMax'
            if ((!(((&(reader__)))->ReadSentinel(471205020)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvOnProgress(std::move(progress), std::move(progressMax));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_OnStatus__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnStatus", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__status = IPC::ReadParam<nsresult>((&(reader__)));
            if (!maybe__status) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;

            }
            auto& status = *maybe__status;
            // Sentinel = 'status'
            if ((!(((&(reader__)))->ReadSentinel(154731173)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvOnStatus(std::move(status));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_OnAfterLastPart__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnAfterLastPart", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aStatus = IPC::ReadParam<nsresult>((&(reader__)));
            if (!maybe__aStatus) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;

            }
            auto& aStatus = *maybe__aStatus;
            // Sentinel = 'aStatus'
            if ((!(((&(reader__)))->ReadSentinel(186712806)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvOnAfterLastPart(std::move(aStatus));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_NotifyClassificationFlags__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_NotifyClassificationFlags", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aClassificationFlags = IPC::ReadParam<uint32_t>((&(reader__)));
            if (!maybe__aClassificationFlags) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& aClassificationFlags = *maybe__aClassificationFlags;
            // Sentinel = 'aClassificationFlags'
            if ((!(((&(reader__)))->ReadSentinel(1390741499)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            auto maybe__aIsThirdParty = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__aIsThirdParty) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& aIsThirdParty = *maybe__aIsThirdParty;
            // Sentinel = 'aIsThirdParty'
            if ((!(((&(reader__)))->ReadSentinel(584058153)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvNotifyClassificationFlags(std::move(aClassificationFlags), std::move(aIsThirdParty));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_SetClassifierMatchedInfo__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_SetClassifierMatchedInfo", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__info = IPC::ReadParam<ClassifierInfo>((&(reader__)));
            if (!maybe__info) {
                FatalError("Error deserializing 'ClassifierInfo'");
                return MsgValueError;

            }
            auto& info = *maybe__info;
            // Sentinel = 'info'
            if ((!(((&(reader__)))->ReadSentinel(70058413)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ClassifierInfo'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvSetClassifierMatchedInfo(std::move(info));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_SetClassifierMatchedTrackingInfo__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_SetClassifierMatchedTrackingInfo", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__info = IPC::ReadParam<ClassifierInfo>((&(reader__)));
            if (!maybe__info) {
                FatalError("Error deserializing 'ClassifierInfo'");
                return MsgValueError;

            }
            auto& info = *maybe__info;
            // Sentinel = 'info'
            if ((!(((&(reader__)))->ReadSentinel(70058413)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ClassifierInfo'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvSetClassifierMatchedTrackingInfo(std::move(info));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_AttachStreamFilter__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_AttachStreamFilter", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::extensions::PStreamFilterParent>>((&(reader__)));
            if (!maybe__aEndpoint) {
                FatalError("Error deserializing 'Endpoint<::mozilla::extensions::PStreamFilterParent>'");
                return MsgValueError;

            }
            auto& aEndpoint = *maybe__aEndpoint;
            // Sentinel = 'aEndpoint'
            if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::extensions::PStreamFilterParent>'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvAttachStreamFilter(std::move(aEndpoint));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg_DetachStreamFilters__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_DetachStreamFilters", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->RecvDetachStreamFilters();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpBackgroundChannel::Msg___delete____ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannel", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PHttpBackgroundChannelChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg___delete__", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<HttpBackgroundChannelChild*>(this))->Recv__delete__();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }


            this->ActorDisconnected(Deletion);

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

auto PHttpBackgroundChannelChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PHttpBackgroundChannelChild::Result
{
    return MsgNotKnown;
}



} // namespace net
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::net::PHttpBackgroundChannelChild*>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, static_cast<mozilla::ipc::IProtocol*>(aVar));
    // Sentinel = 'PHttpBackgroundChannel'
    (aWriter)->WriteSentinel(1640827050);
}

auto ParamTraits<::mozilla::net::PHttpBackgroundChannelChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe__actor = IPC::ReadParam<mozilla::ipc::IProtocol*>(aReader);
    if (!maybe__actor) {
        aReader->FatalError("Error deserializing managed PHttpBackgroundChannel actor");
        return {};

    }
    auto& actor = *maybe__actor;
    // Sentinel = 'PHttpBackgroundChannel'
    if ((!((aReader)->ReadSentinel(1640827050)))) {
        mozilla::ipc::SentinelReadError("Error deserializing managed PHttpBackgroundChannel actor");
        return {};
    }

    if (actor && actor->GetProtocolId() != PHttpBackgroundChannelMsgStart) {
        aReader->FatalError("Unexpected actor type (expected PHttpBackgroundChannel)");

        return {};
    }
    return static_cast<::mozilla::net::PHttpBackgroundChannelChild*>(actor);
}

} // namespace IPC
