commit 904d956b7b04f7bb35fe32142859a9a45b2140b7 parent 0a130f775763457e4b30645c9fba7366a42e5620 Author: Pavel Kireev <hedgefog.98@gmail.com> Date: Tue, 21 Oct 2025 18:11:23 +0000 Bug 1988355 - remove unused nsIHttpChannel.isPrivateResponse. r=valentin,necko-reviewers Lint and build successful. Cleaned references as per https://searchfox.org/firefox-main/search?q=isPrivateResponse&path=&case=false®exp=false r=valentin Differential Revision: https://phabricator.services.mozilla.com/D269443 Diffstat:
8 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -2283,13 +2283,6 @@ HttpBaseChannel::IsNoCacheResponse(bool* value) { } NS_IMETHODIMP -HttpBaseChannel::IsPrivateResponse(bool* value) { - if (!mResponseHead) return NS_ERROR_NOT_AVAILABLE; - *value = mResponseHead->Private(); - return NS_OK; -} - -NS_IMETHODIMP HttpBaseChannel::GetResponseStatus(uint32_t* aValue) { if (!mResponseHead) return NS_ERROR_NOT_AVAILABLE; *aValue = mResponseHead->Status(); diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h @@ -211,7 +211,6 @@ class HttpBaseChannel : public nsHashPropertyBag, NS_IMETHOD SetRedirectionLimit(uint32_t value) override; NS_IMETHOD IsNoStoreResponse(bool* value) override; NS_IMETHOD IsNoCacheResponse(bool* value) override; - NS_IMETHOD IsPrivateResponse(bool* value) override; NS_IMETHOD GetResponseStatus(uint32_t* aValue) override; NS_IMETHOD GetResponseStatusText(nsACString& aValue) override; NS_IMETHOD GetRequestSucceeded(bool* aValue) override; diff --git a/netwerk/protocol/http/NullHttpChannel.cpp b/netwerk/protocol/http/NullHttpChannel.cpp @@ -234,11 +234,6 @@ NullHttpChannel::IsNoCacheResponse(bool* _retval) { } NS_IMETHODIMP -NullHttpChannel::IsPrivateResponse(bool* _retval) { - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP NullHttpChannel::RedirectTo(nsIURI* aNewURI) { return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/netwerk/protocol/http/ObliviousHttpChannel.cpp b/netwerk/protocol/http/ObliviousHttpChannel.cpp @@ -331,13 +331,6 @@ ObliviousHttpChannel::IsNoCacheResponse(bool* _retval) { } NS_IMETHODIMP -ObliviousHttpChannel::IsPrivateResponse(bool* _retval) { - LOG(("ObliviousHttpChannel::IsPrivateResponse NOT IMPLEMENTED [this=%p]", - this)); - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP ObliviousHttpChannel::RedirectTo(nsIURI* aNewURI) { LOG(("ObliviousHttpChannel::RedirectTo NOT IMPLEMENTED [this=%p]", this)); return NS_ERROR_NOT_IMPLEMENTED; diff --git a/netwerk/protocol/http/nsIHttpChannel.idl b/netwerk/protocol/http/nsIHttpChannel.idl @@ -402,15 +402,6 @@ interface nsIHttpChannel : nsIIdentChannel [must_use] boolean isNoCacheResponse(); /** - * Returns true if the server sent a "Cache-Control: private" response - * header. - * - * @throws NS_ERROR_NOT_AVAILABLE if called before the response - * has been received (before onStartRequest). - */ - [must_use] boolean isPrivateResponse(); - - /** * Instructs the channel to immediately redirect to a new destination. * Can only be called on channels that have not yet called their * listener's OnStartRequest(). Generally that means the latest time diff --git a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp @@ -976,12 +976,6 @@ nsViewSourceChannel::IsNoCacheResponse(bool* _retval) { } NS_IMETHODIMP -nsViewSourceChannel::IsPrivateResponse(bool* _retval) { - return !mHttpChannel ? NS_ERROR_NULL_POINTER - : mHttpChannel->IsPrivateResponse(_retval); -} - -NS_IMETHODIMP nsViewSourceChannel::RedirectTo(nsIURI* uri) { return !mHttpChannel ? NS_ERROR_NULL_POINTER : mHttpChannel->RedirectTo(uri); } diff --git a/netwerk/test/httpserver/test/test_basic_functionality.js b/netwerk/test/httpserver/test/test_basic_functionality.js @@ -71,7 +71,6 @@ function commonCheck(ch) { Assert.greater(ch.contentLength, -1); Assert.equal(ch.getResponseHeader("connection"), "close"); Assert.ok(!ch.isNoStoreResponse()); - Assert.ok(!ch.isPrivateResponse()); } function start_objHandler(ch) { diff --git a/tools/@types/generated/lib.gecko.xpcom.d.ts b/tools/@types/generated/lib.gecko.xpcom.d.ts @@ -8396,7 +8396,6 @@ interface nsIHttpChannel extends nsIIdentChannel { visitOriginalResponseHeaders(aVisitor: nsIHttpHeaderVisitor): void; isNoStoreResponse(): boolean; isNoCacheResponse(): boolean; - isPrivateResponse(): boolean; redirectTo(aTargetURI: nsIURI): void; upgradeToSecure(): void; topLevelContentWindowId: u64;