From 1852a9510684bac93d098263fa77a9bde8919d8f Mon Sep 17 00:00:00 2001 From: Manuel Bucher Date: Mon, 9 Jan 2023 09:43:17 +0000 Subject: [PATCH] Bug 1802934 - Remove unused parameter aUsePrivateBrowsing from ParentChannelListeners constructor r=necko-reviewers,valentin Parameter got unused in https://phabricator.services.mozilla.com/D74434 Differential Revision: https://phabricator.services.mozilla.com/D166181 --- netwerk/ipc/DocumentLoadListener.cpp | 3 +-- netwerk/protocol/http/EarlyHintPreloader.cpp | 2 +- netwerk/protocol/http/HttpChannelParent.cpp | 3 +-- netwerk/protocol/http/ParentChannelListener.cpp | 4 +--- netwerk/protocol/http/ParentChannelListener.h | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp index 61fedf4faa62..5a21aac009f4 100644 --- a/netwerk/ipc/DocumentLoadListener.cpp +++ b/netwerk/ipc/DocumentLoadListener.cpp @@ -408,8 +408,7 @@ DocumentLoadListener::DocumentLoadListener( : mIsDocumentLoad(aIsDocumentLoad) { LOG(("DocumentLoadListener ctor [this=%p]", this)); mParentChannelListener = - new ParentChannelListener(this, aLoadingBrowsingContext, - aLoadingBrowsingContext->UsePrivateBrowsing()); + new ParentChannelListener(this, aLoadingBrowsingContext); } DocumentLoadListener::~DocumentLoadListener() { diff --git a/netwerk/protocol/http/EarlyHintPreloader.cpp b/netwerk/protocol/http/EarlyHintPreloader.cpp index cf8720968b78..9c9732183f10 100644 --- a/netwerk/protocol/http/EarlyHintPreloader.cpp +++ b/netwerk/protocol/http/EarlyHintPreloader.cpp @@ -390,7 +390,7 @@ nsresult EarlyHintPreloader::OpenChannel( success = httpChannel->SetRequestHeader("X-Moz"_ns, "early hint"_ns, false); MOZ_ASSERT(NS_SUCCEEDED(success)); - mParentListener = new ParentChannelListener(this, nullptr, false); + mParentListener = new ParentChannelListener(this, nullptr); PriorizeAsPreload(); diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp index 8cee60cf3e2b..99d1e3827fc7 100644 --- a/netwerk/protocol/http/HttpChannelParent.cpp +++ b/netwerk/protocol/http/HttpChannelParent.cpp @@ -536,8 +536,7 @@ bool HttpChannelParent::DoAsyncOpen( } RefPtr parentListener = new ParentChannelListener( - this, mBrowserParent ? mBrowserParent->GetBrowsingContext() : nullptr, - mLoadContext && mLoadContext->UsePrivateBrowsing()); + this, mBrowserParent ? mBrowserParent->GetBrowsingContext() : nullptr); httpChannel->SetRequestMethod(nsDependentCString(requestMethod.get())); diff --git a/netwerk/protocol/http/ParentChannelListener.cpp b/netwerk/protocol/http/ParentChannelListener.cpp index f5bdb206caa5..b80200e11c6b 100644 --- a/netwerk/protocol/http/ParentChannelListener.cpp +++ b/netwerk/protocol/http/ParentChannelListener.cpp @@ -15,7 +15,6 @@ #include "mozilla/net/HttpChannelParent.h" #include "mozilla/net/RedirectChannelRegistrar.h" #include "mozilla/SchedulerGroup.h" -#include "mozilla/Unused.h" #include "nsIHttpHeaderVisitor.h" #include "nsIPrompt.h" #include "nsISecureBrowserUI.h" @@ -30,7 +29,6 @@ #include "mozilla/dom/LoadURIOptionsBinding.h" #include "nsIWebNavigation.h" -using mozilla::Unused; using mozilla::dom::ServiceWorkerInterceptController; namespace mozilla { @@ -38,7 +36,7 @@ namespace net { ParentChannelListener::ParentChannelListener( nsIStreamListener* aListener, - dom::CanonicalBrowsingContext* aBrowsingContext, bool aUsePrivateBrowsing) + dom::CanonicalBrowsingContext* aBrowsingContext) : mNextListener(aListener), mBrowsingContext(aBrowsingContext) { LOG(("ParentChannelListener::ParentChannelListener [this=%p, next=%p]", this, aListener)); diff --git a/netwerk/protocol/http/ParentChannelListener.h b/netwerk/protocol/http/ParentChannelListener.h index 5c39612e6b7c..a6454f8de712 100644 --- a/netwerk/protocol/http/ParentChannelListener.h +++ b/netwerk/protocol/http/ParentChannelListener.h @@ -46,8 +46,7 @@ class ParentChannelListener final : public nsIInterfaceRequestor, explicit ParentChannelListener( nsIStreamListener* aListener, - dom::CanonicalBrowsingContext* aBrowsingContext, - bool aUsePrivateBrowsing); + dom::CanonicalBrowsingContext* aBrowsingContext); // Called to set a new listener which replaces the old one after a redirect. void SetListenerAfterRedirect(nsIStreamListener* aListener);