Bug 1917063 - Remove unused NotifySetCookie. r=valentin,necko-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D221353
This commit is contained in:
edgul
2024-09-06 20:27:37 +00:00
parent c99ee4ccb1
commit 29deb1ba8d
2 changed files with 1 additions and 20 deletions

View File

@@ -2498,15 +2498,6 @@ HttpBaseChannel::GetResponseVersion(uint32_t* major, uint32_t* minor) {
return NS_OK;
}
void HttpBaseChannel::NotifySetCookie(const nsACString& aCookie) {
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
if (obs) {
obs->NotifyObservers(static_cast<nsIChannel*>(this),
"http-on-response-set-cookie",
NS_ConvertASCIItoUTF16(aCookie).get());
}
}
bool HttpBaseChannel::IsBrowsingContextDiscarded() const {
// If there is no loadGroup attached to the current channel, we check the
// global private browsing state for the private channel instead. For
@@ -3582,11 +3573,7 @@ HttpBaseChannel::SetCookie(const nsACString& aCookieHeader) {
nsICookieService* cs = gHttpHandler->GetCookieService();
NS_ENSURE_TRUE(cs, NS_ERROR_FAILURE);
nsresult rv = cs->SetCookieStringFromHttp(mURI, aCookieHeader, this);
if (NS_SUCCEEDED(rv)) {
NotifySetCookie(aCookieHeader);
}
return rv;
return cs->SetCookieStringFromHttp(mURI, aCookieHeader, this);
}
NS_IMETHODIMP