Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / netwerk / base / SimpleChannelParent.cpp
blob77bf3beb479b0984d026dba2b9fde8dc1b141907
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 #include "SimpleChannelParent.h"
8 #include "mozilla/Assertions.h"
9 #include "nsNetUtil.h"
10 #include "nsIChannel.h"
12 namespace mozilla {
13 namespace net {
15 NS_IMPL_ISUPPORTS(SimpleChannelParent, nsIParentChannel, nsIStreamListener)
17 bool SimpleChannelParent::Init(const uint32_t& channelId) {
18 nsCOMPtr<nsIChannel> channel;
19 MOZ_ALWAYS_SUCCEEDS(
20 NS_LinkRedirectChannels(channelId, this, getter_AddRefs(channel)));
22 return true;
25 NS_IMETHODIMP
26 SimpleChannelParent::SetParentListener(HttpChannelParentListener* aListener) {
27 // Nothing to do.
28 return NS_OK;
31 NS_IMETHODIMP
32 SimpleChannelParent::NotifyChannelClassifierProtectionDisabled(
33 uint32_t aAcceptedReason) {
34 // Nothing to do.
35 return NS_OK;
38 NS_IMETHODIMP
39 SimpleChannelParent::NotifyCookieAllowed() {
40 // Nothing to do.
41 return NS_OK;
44 NS_IMETHODIMP
45 SimpleChannelParent::NotifyCookieBlocked(uint32_t aRejectedReason) {
46 // Nothing to do.
47 return NS_OK;
50 NS_IMETHODIMP
51 SimpleChannelParent::NotifyTrackingResource(bool aIsThirdParty) {
52 // Nothing to do.
53 return NS_OK;
56 NS_IMETHODIMP
57 SimpleChannelParent::NotifyFlashPluginStateChanged(
58 nsIHttpChannel::FlashPluginState aState) {
59 // Nothing to do.
60 return NS_OK;
63 NS_IMETHODIMP
64 SimpleChannelParent::SetClassifierMatchedInfo(const nsACString& aList,
65 const nsACString& aProvider,
66 const nsACString& aPrefix) {
67 // nothing to do
68 return NS_OK;
71 NS_IMETHODIMP
72 SimpleChannelParent::Delete() {
73 // Nothing to do.
74 return NS_OK;
77 void SimpleChannelParent::ActorDestroy(ActorDestroyReason aWhy) {}
79 NS_IMETHODIMP
80 SimpleChannelParent::OnStartRequest(nsIRequest* aRequest,
81 nsISupports* aContext) {
82 // We don't have a way to prevent nsBaseChannel from calling AsyncOpen on
83 // the created nsSimpleChannel. We don't have anywhere to send the data in the
84 // parent, so abort the binding.
85 return NS_BINDING_ABORTED;
88 NS_IMETHODIMP
89 SimpleChannelParent::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext,
90 nsresult aStatusCode) {
91 // See above.
92 MOZ_ASSERT(NS_FAILED(aStatusCode));
93 return NS_OK;
96 NS_IMETHODIMP
97 SimpleChannelParent::OnDataAvailable(nsIRequest* aRequest,
98 nsISupports* aContext,
99 nsIInputStream* aInputStream,
100 uint64_t aOffset, uint32_t aCount) {
101 // See above.
102 MOZ_CRASH("Should never be called");
105 } // namespace net
106 } // namespace mozilla