LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PHttpBackgroundChannelParent.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 80 193 41.5 %
Date: 2017-07-14 16:53:18 Functions: 11 27 40.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Automatically generated by ipdlc.
       3             : // Edit at your own risk
       4             : //
       5             : 
       6             : 
       7             : #include "mozilla/net/PHttpBackgroundChannelParent.h"
       8             : #include "mozilla/net/TimingStruct.h"
       9             : 
      10             : #include "mozilla/ipc/PBackgroundParent.h"
      11             : 
      12             : #include "nsIFile.h"
      13             : #include "GeckoProfiler.h"
      14             : 
      15             : namespace mozilla {
      16             : namespace net {
      17             : 
      18             : 
      19             : 
      20           3 : MOZ_IMPLICIT PHttpBackgroundChannelParent::PHttpBackgroundChannelParent() :
      21             :     mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
      22           3 :     mState(PHttpBackgroundChannel::__Dead)
      23             : {
      24           3 :     MOZ_COUNT_CTOR(PHttpBackgroundChannelParent);
      25           3 : }
      26             : 
      27           6 : PHttpBackgroundChannelParent::~PHttpBackgroundChannelParent()
      28             : {
      29           3 :     MOZ_COUNT_DTOR(PHttpBackgroundChannelParent);
      30           3 : }
      31             : 
      32           3 : auto PHttpBackgroundChannelParent::Manager() const -> PBackgroundParent*
      33             : {
      34           3 :     return static_cast<PBackgroundParent*>(IProtocol::Manager());
      35             : }
      36             : 
      37           3 : auto PHttpBackgroundChannelParent::SendOnStartRequestSent() -> bool
      38             : {
      39           3 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_OnStartRequestSent(Id());
      40             : 
      41             : 
      42             : 
      43             : 
      44             : 
      45           3 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
      46           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      47             :     }
      48           6 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnStartRequestSent", OTHER);
      49           3 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_OnStartRequestSent__ID, (&(mState)));
      50             : 
      51           3 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      52           6 :     return sendok__;
      53             : }
      54             : 
      55           3 : auto PHttpBackgroundChannelParent::SendOnTransportAndData(
      56             :         const nsresult& channelStatus,
      57             :         const nsresult& transportStatus,
      58             :         const uint64_t& offset,
      59             :         const uint32_t& count,
      60             :         const nsCString& data) -> bool
      61             : {
      62           3 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_OnTransportAndData(Id());
      63             : 
      64           3 :     Write(channelStatus, msg__);
      65             :     // Sentinel = 'channelStatus'
      66           3 :     (msg__)->WriteSentinel(3148019746);
      67           3 :     Write(transportStatus, msg__);
      68             :     // Sentinel = 'transportStatus'
      69           3 :     (msg__)->WriteSentinel(1295005818);
      70           3 :     Write(offset, msg__);
      71             :     // Sentinel = 'offset'
      72           3 :     (msg__)->WriteSentinel(1369947863);
      73           3 :     Write(count, msg__);
      74             :     // Sentinel = 'count'
      75           3 :     (msg__)->WriteSentinel(2126421856);
      76           3 :     Write(data, msg__);
      77             :     // Sentinel = 'data'
      78           3 :     (msg__)->WriteSentinel(843352540);
      79             : 
      80             : 
      81             : 
      82             : 
      83           3 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
      84           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      85             :     }
      86           6 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnTransportAndData", OTHER);
      87           3 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_OnTransportAndData__ID, (&(mState)));
      88             : 
      89           3 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      90           6 :     return sendok__;
      91             : }
      92             : 
      93           3 : auto PHttpBackgroundChannelParent::SendOnStopRequest(
      94             :         const nsresult& channelStatus,
      95             :         const ResourceTimingStruct& timing) -> bool
      96             : {
      97           3 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_OnStopRequest(Id());
      98             : 
      99           3 :     Write(channelStatus, msg__);
     100             :     // Sentinel = 'channelStatus'
     101           3 :     (msg__)->WriteSentinel(3148019746);
     102           3 :     Write(timing, msg__);
     103             :     // Sentinel = 'timing'
     104           3 :     (msg__)->WriteSentinel(3852786776);
     105             : 
     106             : 
     107             : 
     108             : 
     109           3 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     110           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     111             :     }
     112           6 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnStopRequest", OTHER);
     113           3 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_OnStopRequest__ID, (&(mState)));
     114             : 
     115           3 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     116           6 :     return sendok__;
     117             : }
     118             : 
     119           0 : auto PHttpBackgroundChannelParent::SendOnProgress(
     120             :         const int64_t& progress,
     121             :         const int64_t& progressMax) -> bool
     122             : {
     123           0 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_OnProgress(Id());
     124             : 
     125           0 :     Write(progress, msg__);
     126             :     // Sentinel = 'progress'
     127           0 :     (msg__)->WriteSentinel(858119353);
     128           0 :     Write(progressMax, msg__);
     129             :     // Sentinel = 'progressMax'
     130           0 :     (msg__)->WriteSentinel(2530734978);
     131             : 
     132             : 
     133             : 
     134             : 
     135           0 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     136           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     137             :     }
     138           0 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnProgress", OTHER);
     139           0 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_OnProgress__ID, (&(mState)));
     140             : 
     141           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     142           0 :     return sendok__;
     143             : }
     144             : 
     145           5 : auto PHttpBackgroundChannelParent::SendOnStatus(const nsresult& status) -> bool
     146             : {
     147           5 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_OnStatus(Id());
     148             : 
     149           5 :     Write(status, msg__);
     150             :     // Sentinel = 'status'
     151           5 :     (msg__)->WriteSentinel(3714608576);
     152             : 
     153             : 
     154             : 
     155             : 
     156           5 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     157           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     158             :     }
     159          10 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_OnStatus", OTHER);
     160           5 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_OnStatus__ID, (&(mState)));
     161             : 
     162           5 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     163          10 :     return sendok__;
     164             : }
     165             : 
     166           0 : auto PHttpBackgroundChannelParent::SendFlushedForDiversion() -> bool
     167             : {
     168           0 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_FlushedForDiversion(Id());
     169             : 
     170             : 
     171             : 
     172             : 
     173             : 
     174           0 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     175           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     176             :     }
     177           0 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_FlushedForDiversion", OTHER);
     178           0 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_FlushedForDiversion__ID, (&(mState)));
     179             : 
     180           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     181           0 :     return sendok__;
     182             : }
     183             : 
     184           0 : auto PHttpBackgroundChannelParent::SendDivertMessages() -> bool
     185             : {
     186           0 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_DivertMessages(Id());
     187             : 
     188             : 
     189             : 
     190             : 
     191             : 
     192           0 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     193           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     194             :     }
     195           0 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_DivertMessages", OTHER);
     196           0 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_DivertMessages__ID, (&(mState)));
     197             : 
     198           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     199           0 :     return sendok__;
     200             : }
     201             : 
     202           0 : auto PHttpBackgroundChannelParent::SendNotifyTrackingProtectionDisabled() -> bool
     203             : {
     204           0 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_NotifyTrackingProtectionDisabled(Id());
     205             : 
     206             : 
     207             : 
     208             : 
     209             : 
     210           0 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     211           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     212             :     }
     213           0 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_NotifyTrackingProtectionDisabled", OTHER);
     214           0 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_NotifyTrackingProtectionDisabled__ID, (&(mState)));
     215             : 
     216           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     217           0 :     return sendok__;
     218             : }
     219             : 
     220           0 : auto PHttpBackgroundChannelParent::SendNotifyTrackingResource() -> bool
     221             : {
     222           0 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_NotifyTrackingResource(Id());
     223             : 
     224             : 
     225             : 
     226             : 
     227             : 
     228           0 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     229           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     230             :     }
     231           0 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_NotifyTrackingResource", OTHER);
     232           0 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_NotifyTrackingResource__ID, (&(mState)));
     233             : 
     234           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     235           0 :     return sendok__;
     236             : }
     237             : 
     238           0 : auto PHttpBackgroundChannelParent::SendSetClassifierMatchedInfo(const ClassifierInfo& info) -> bool
     239             : {
     240           0 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg_SetClassifierMatchedInfo(Id());
     241             : 
     242           0 :     Write(info, msg__);
     243             :     // Sentinel = 'info'
     244           0 :     (msg__)->WriteSentinel(3750868832);
     245             : 
     246             : 
     247             : 
     248             : 
     249           0 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     250           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     251             :     }
     252           0 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg_SetClassifierMatchedInfo", OTHER);
     253           0 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg_SetClassifierMatchedInfo__ID, (&(mState)));
     254             : 
     255           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     256           0 :     return sendok__;
     257             : }
     258             : 
     259           3 : auto PHttpBackgroundChannelParent::Send__delete__(PHttpBackgroundChannelParent* actor) -> bool
     260             : {
     261           3 :     if ((!(actor))) {
     262           0 :         return false;
     263             :     }
     264             : 
     265           3 :     IPC::Message* msg__ = PHttpBackgroundChannel::Msg___delete__((actor)->Id());
     266             : 
     267           3 :     (actor)->Write(actor, msg__, false);
     268             :     // Sentinel = 'actor'
     269           3 :     (msg__)->WriteSentinel(875202478);
     270             : 
     271             : 
     272             : 
     273           3 :     if (mozilla::ipc::LoggingEnabledFor("PHttpBackgroundChannelParent")) {
     274           0 :         mozilla::ipc::LogMessageForProtocol("PHttpBackgroundChannelParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     275             :     }
     276           6 :     AUTO_PROFILER_LABEL("PHttpBackgroundChannel::Msg___delete__", OTHER);
     277           3 :     PHttpBackgroundChannel::Transition(PHttpBackgroundChannel::Msg___delete____ID, (&((actor)->mState)));
     278             : 
     279           3 :     bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
     280             : 
     281           3 :     IProtocol* mgr = (actor)->Manager();
     282           3 :     (actor)->DestroySubtree(Deletion);
     283           3 :     (actor)->DeallocSubtree();
     284           3 :     (mgr)->RemoveManagee(PHttpBackgroundChannelMsgStart, actor);
     285           3 :     return sendok__;
     286             : }
     287             : 
     288           0 : auto PHttpBackgroundChannelParent::RemoveManagee(
     289             :         int32_t aProtocolId,
     290             :         ProtocolBase* aListener) -> void
     291             : {
     292           0 :     FatalError("unreached");
     293           0 :     return;
     294             : }
     295             : 
     296           0 : auto PHttpBackgroundChannelParent::OnMessageReceived(const Message& msg__) -> PHttpBackgroundChannelParent::Result
     297             : {
     298           0 :     switch ((msg__).type()) {
     299             :     case PHttpBackgroundChannel::Reply___delete____ID:
     300             :         {
     301           0 :             return MsgProcessed;
     302             :         }
     303             :     default:
     304             :         {
     305           0 :             return MsgNotKnown;
     306             :         }
     307             :     }
     308             : }
     309             : 
     310           0 : auto PHttpBackgroundChannelParent::OnMessageReceived(
     311             :         const Message& msg__,
     312             :         Message*& reply__) -> PHttpBackgroundChannelParent::Result
     313             : {
     314           0 :     return MsgNotKnown;
     315             : }
     316             : 
     317           0 : auto PHttpBackgroundChannelParent::OnCallReceived(
     318             :         const Message& msg__,
     319             :         Message*& reply__) -> PHttpBackgroundChannelParent::Result
     320             : {
     321           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     322             :     return MsgNotKnown;
     323             : }
     324             : 
     325           0 : auto PHttpBackgroundChannelParent::GetProtocolTypeId() -> int32_t
     326             : {
     327           0 :     return PHttpBackgroundChannelMsgStart;
     328             : }
     329             : 
     330           0 : auto PHttpBackgroundChannelParent::ProtocolName() const -> const char*
     331             : {
     332           0 :     return "PHttpBackgroundChannelParent";
     333             : }
     334             : 
     335           3 : auto PHttpBackgroundChannelParent::DestroySubtree(ActorDestroyReason why) -> void
     336             : {
     337             :     // Unregister from our manager.
     338           3 :     Unregister(Id());
     339             : 
     340             :     // Reject owning pending promises.
     341           3 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     342             : 
     343             :     // Finally, destroy "us".
     344           3 :     ActorDestroy(why);
     345           3 : }
     346             : 
     347           3 : auto PHttpBackgroundChannelParent::DeallocSubtree() -> void
     348             : {
     349           3 : }
     350             : 
     351           0 : auto PHttpBackgroundChannelParent::Write(
     352             :         const ClassifierInfo& v__,
     353             :         Message* msg__) -> void
     354             : {
     355           0 :     Write((v__).list(), msg__);
     356             :     // Sentinel = 'list'
     357           0 :     (msg__)->WriteSentinel(1914335340);
     358           0 :     Write((v__).provider(), msg__);
     359             :     // Sentinel = 'provider'
     360           0 :     (msg__)->WriteSentinel(3034771127);
     361           0 :     Write((v__).prefix(), msg__);
     362             :     // Sentinel = 'prefix'
     363           0 :     (msg__)->WriteSentinel(4169957394);
     364           0 : }
     365             : 
     366           0 : auto PHttpBackgroundChannelParent::Read(
     367             :         ClassifierInfo* v__,
     368             :         const Message* msg__,
     369             :         PickleIterator* iter__) -> bool
     370             : {
     371           0 :     if ((!(Read((&((v__)->list())), msg__, iter__)))) {
     372           0 :         FatalError("Error deserializing 'list' (nsCString) member of 'ClassifierInfo'");
     373           0 :         return false;
     374             :     }
     375             :     // Sentinel = 'list'
     376           0 :     if ((!((msg__)->ReadSentinel(iter__, 1914335340)))) {
     377           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'list' (nsCString) member of 'ClassifierInfo'");
     378           0 :         return false;
     379             :     }
     380           0 :     if ((!(Read((&((v__)->provider())), msg__, iter__)))) {
     381           0 :         FatalError("Error deserializing 'provider' (nsCString) member of 'ClassifierInfo'");
     382           0 :         return false;
     383             :     }
     384             :     // Sentinel = 'provider'
     385           0 :     if ((!((msg__)->ReadSentinel(iter__, 3034771127)))) {
     386           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'provider' (nsCString) member of 'ClassifierInfo'");
     387           0 :         return false;
     388             :     }
     389           0 :     if ((!(Read((&((v__)->prefix())), msg__, iter__)))) {
     390           0 :         FatalError("Error deserializing 'prefix' (nsCString) member of 'ClassifierInfo'");
     391           0 :         return false;
     392             :     }
     393             :     // Sentinel = 'prefix'
     394           0 :     if ((!((msg__)->ReadSentinel(iter__, 4169957394)))) {
     395           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'prefix' (nsCString) member of 'ClassifierInfo'");
     396           0 :         return false;
     397             :     }
     398           0 :     return true;
     399             : }
     400             : 
     401           3 : auto PHttpBackgroundChannelParent::Write(
     402             :         const PHttpBackgroundChannelParent* v__,
     403             :         Message* msg__,
     404             :         bool nullable__) -> void
     405             : {
     406             :     int32_t id;
     407           3 :     if ((!(v__))) {
     408           0 :         if ((!(nullable__))) {
     409           0 :             FatalError("NULL actor value passed to non-nullable param");
     410             :         }
     411           0 :         id = 0;
     412             :     }
     413             :     else {
     414           3 :         id = (v__)->Id();
     415           3 :         if ((1) == (id)) {
     416           0 :             FatalError("actor has been |delete|d");
     417             :         }
     418             :     }
     419             : 
     420           3 :     Write(id, msg__);
     421           3 : }
     422             : 
     423           0 : auto PHttpBackgroundChannelParent::Read(
     424             :         PHttpBackgroundChannelParent** v__,
     425             :         const Message* msg__,
     426             :         PickleIterator* iter__,
     427             :         bool nullable__) -> bool
     428             : {
     429           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PHttpBackgroundChannel", PHttpBackgroundChannelMsgStart);
     430           0 :     if ((actor).isNothing()) {
     431           0 :         return false;
     432             :     }
     433             : 
     434           0 :     (*(v__)) = static_cast<PHttpBackgroundChannelParent*>((actor).value());
     435           0 :     return true;
     436             : }
     437             : 
     438             : 
     439             : 
     440             : } // namespace net
     441             : } // namespace mozilla

Generated by: LCOV version 1.13