Backed out changeset 36e95068e103 (bug 1848160) for bc failures on browser_preference...
[gecko.git] / netwerk / base / SimpleChannelParent.h
blob6a8f2c867ba5cf9f3e857344d9073e42615e1a42
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=4 sw=2 sts=2 et 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 NS_SIMPLECHANNELPARENT_H
8 #define NS_SIMPLECHANNELPARENT_H
10 #include "nsIParentChannel.h"
11 #include "nsISupportsImpl.h"
13 #include "mozilla/net/PSimpleChannelParent.h"
15 namespace mozilla {
16 namespace net {
18 // In order to support HTTP redirects, we need to implement the HTTP
19 // redirection API, which requires a class that implements nsIParentChannel
20 // and which calls NS_LinkRedirectChannels.
21 class SimpleChannelParent : public nsIParentChannel,
22 public PSimpleChannelParent {
23 public:
24 NS_DECL_ISUPPORTS
25 NS_DECL_NSIPARENTCHANNEL
26 NS_DECL_NSIREQUESTOBSERVER
27 NS_DECL_NSISTREAMLISTENER; // semicolon for clang-format bug 1629756
29 [[nodiscard]] bool Init(const uint64_t& aChannelId);
31 private:
32 ~SimpleChannelParent() = default;
34 virtual void ActorDestroy(ActorDestroyReason why) override;
37 } // namespace net
38 } // namespace mozilla
40 #endif /* NS_SIMPLECHANNELPARENT_H */