Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / quota / QuotaRequestBase.h
blobe5db95f8c9dcdcb8b83b7f3760c41bcc9aa6a8d2
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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_QUOTA_QUOTAREQUESTBASE_H_
8 #define DOM_QUOTA_QUOTAREQUESTBASE_H_
10 #include "NormalOriginOperationBase.h"
11 #include "mozilla/dom/quota/PQuotaRequestParent.h"
13 namespace mozilla::dom::quota {
15 class RequestResponse;
17 class QuotaRequestBase : public NormalOriginOperationBase,
18 public PQuotaRequestParent {
19 protected:
20 QuotaRequestBase(MovingNotNull<RefPtr<QuotaManager>> aQuotaManager,
21 const char* aName)
22 : NormalOriginOperationBase(std::move(aQuotaManager), aName) {}
24 // Subclasses use this override to set the IPDL response value.
25 virtual void GetResponse(RequestResponse& aResponse) = 0;
27 private:
28 virtual void SendResults() override;
30 // IPDL methods.
31 virtual void ActorDestroy(ActorDestroyReason aWhy) override;
34 } // namespace mozilla::dom::quota
36 #endif // DOM_QUOTA_QUOTAREQUESTBASE_H_