author Kershaw Chang <>
Fri, 11 Jan 2019 20:52:39 +0000
changeset 510641 7c4eddc3a80db9c9166d84314bd7a35629868857
parent 510576 a81f83df08d50ced7d669958f9a06f52b087a5fc
child 510577 86032a14d26fc5be8c6802ec915db14e1a371b6c
permissions -rw-r--r--
Bug 1513057 - P3: Setup memory reporter on socket process r=dragana,mayhemer To setup memory reporter on socket process, this patch modifies the PSocketProcess protocol to implement the same memory reporting functions as the PContent and PGPU protocols. Differential Revision:

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef mozilla_net_SocketProcessChild_h
#define mozilla_net_SocketProcessChild_h

#include "mozilla/net/PSocketProcessChild.h"

namespace mozilla {
namespace net {

// The IPC actor implements PSocketProcessChild in child process.
// This is allocated and kept alive by SocketProcessImpl.
class SocketProcessChild final : public PSocketProcessChild {

  static SocketProcessChild* GetSingleton();

  bool Init(base::ProcessId aParentPid, const char* aParentBuildID,
            MessageLoop* aIOLoop, IPC::Channel* aChannel);

  void ActorDestroy(ActorDestroyReason aWhy) override;

  mozilla::ipc::IPCResult RecvPreferenceUpdate(const Pref& aPref) override;
  mozilla::ipc::IPCResult RecvRequestMemoryReport(
      const uint32_t& generation, const bool& anonymize,
      const bool& minimizeMemoryUsage, const MaybeFileDesc& DMDFile) override;

  void CleanUp();


}  // namespace net
}  // namespace mozilla

#endif  // mozilla_net_SocketProcessChild_h