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"
10 #include "nsIChannel.h"
15 NS_IMPL_ISUPPORTS(SimpleChannelParent
, nsIParentChannel
, nsIStreamListener
)
17 bool SimpleChannelParent::Init(const uint32_t& channelId
) {
18 nsCOMPtr
<nsIChannel
> channel
;
20 NS_LinkRedirectChannels(channelId
, this, getter_AddRefs(channel
)));
26 SimpleChannelParent::SetParentListener(HttpChannelParentListener
* aListener
) {
32 SimpleChannelParent::NotifyChannelClassifierProtectionDisabled(
33 uint32_t aAcceptedReason
) {
39 SimpleChannelParent::NotifyCookieAllowed() {
45 SimpleChannelParent::NotifyCookieBlocked(uint32_t aRejectedReason
) {
51 SimpleChannelParent::NotifyTrackingResource(bool aIsThirdParty
) {
57 SimpleChannelParent::NotifyFlashPluginStateChanged(
58 nsIHttpChannel::FlashPluginState aState
) {
64 SimpleChannelParent::SetClassifierMatchedInfo(const nsACString
& aList
,
65 const nsACString
& aProvider
,
66 const nsACString
& aPrefix
) {
72 SimpleChannelParent::Delete() {
77 void SimpleChannelParent::ActorDestroy(ActorDestroyReason aWhy
) {}
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
;
89 SimpleChannelParent::OnStopRequest(nsIRequest
* aRequest
, nsISupports
* aContext
,
90 nsresult aStatusCode
) {
92 MOZ_ASSERT(NS_FAILED(aStatusCode
));
97 SimpleChannelParent::OnDataAvailable(nsIRequest
* aRequest
,
98 nsISupports
* aContext
,
99 nsIInputStream
* aInputStream
,
100 uint64_t aOffset
, uint32_t aCount
) {
102 MOZ_CRASH("Should never be called");
106 } // namespace mozilla