Bug 1932613 - temporarily disable browser_ml_end_to_end.js for permanent failures...
[gecko.git] / xpcom / base / MemoryReportingProcess.h
blob36410e702b46272c556461748b999c3f18a98875
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef xpcom_base_MemoryReportingProcess_h
8 #define xpcom_base_MemoryReportingProcess_h
10 #include <stdint.h>
11 #include "nscore.h"
13 namespace mozilla {
14 namespace ipc {
15 class FileDescriptor;
16 } // namespace ipc
18 template <class T>
19 class Maybe;
21 // Top-level process actors should implement this to integrate with
22 // nsMemoryReportManager.
23 class MemoryReportingProcess {
24 public:
25 NS_IMETHOD_(MozExternalRefCountType) AddRef() = 0;
26 NS_IMETHOD_(MozExternalRefCountType) Release() = 0;
28 virtual ~MemoryReportingProcess() = default;
30 // Return true if the process is still alive, false otherwise.
31 virtual bool IsAlive() const = 0;
33 // Initiate a memory report request, returning true if a report was
34 // successfully initiated and false otherwise.
35 virtual bool SendRequestMemoryReport(
36 const uint32_t& aGeneration, const bool& aAnonymize,
37 const bool& aMinimizeMemoryUsage,
38 const Maybe<mozilla::ipc::FileDescriptor>& aDMDFile) = 0;
40 virtual int32_t Pid() const = 0;
43 } // namespace mozilla
45 #endif // xpcom_base_MemoryReportingProcess_h