diff --git a/ipc/glue/BackgroundUtils.cpp b/ipc/glue/BackgroundUtils.cpp index e3b9a8997532..0f7078b3e690 100644 --- a/ipc/glue/BackgroundUtils.cpp +++ b/ipc/glue/BackgroundUtils.cpp @@ -575,9 +575,8 @@ nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo, aLoadInfo->GetIsPreflight(), aLoadInfo->GetLoadTriggeredFromExternal(), aLoadInfo->GetServiceWorkerTaintingSynthesized(), aLoadInfo->GetDocumentHasUserInteracted(), - aLoadInfo->GetDocumentHasLoaded(), - aLoadInfo->GetAllowListFutureDocumentsCreatedFromThisRedirectChain(), - cspNonce, aLoadInfo->GetSkipContentSniffing(), + aLoadInfo->GetDocumentHasLoaded(), cspNonce, + aLoadInfo->GetSkipContentSniffing(), aLoadInfo->GetIsFromProcessingFrameAttributes(), cookieSettingsArgs, aLoadInfo->GetRequestBlockingReason(), maybeCspToInheritInfo)); @@ -765,10 +764,9 @@ nsresult LoadInfoArgsToLoadInfo( loadInfoArgs.loadTriggeredFromExternal(), loadInfoArgs.serviceWorkerTaintingSynthesized(), loadInfoArgs.documentHasUserInteracted(), - loadInfoArgs.documentHasLoaded(), - loadInfoArgs.allowListFutureDocumentsCreatedFromThisRedirectChain(), - loadInfoArgs.cspNonce(), loadInfoArgs.skipContentSniffing(), - loadInfoArgs.requestBlockingReason(), aLoadingContext); + loadInfoArgs.documentHasLoaded(), loadInfoArgs.cspNonce(), + loadInfoArgs.skipContentSniffing(), loadInfoArgs.requestBlockingReason(), + aLoadingContext); if (loadInfoArgs.isFromProcessingFrameAttributes()) { loadInfo->SetIsFromProcessingFrameAttributes(); @@ -787,7 +785,6 @@ void LoadInfoToParentLoadInfoForwarder( false, // serviceWorkerTaintingSynthesized false, // documentHasUserInteracted false, // documentHasLoaded - false, // allowListFutureDocumentsCreatedFromThisRedirectChain Maybe(), nsILoadInfo::BLOCKING_REASON_NONE); // requestBlockingReason return; @@ -819,9 +816,8 @@ void LoadInfoToParentLoadInfoForwarder( aLoadInfo->GetSkipContentSniffing(), aLoadInfo->GetServiceWorkerTaintingSynthesized(), aLoadInfo->GetDocumentHasUserInteracted(), - aLoadInfo->GetDocumentHasLoaded(), - aLoadInfo->GetAllowListFutureDocumentsCreatedFromThisRedirectChain(), - cookieSettingsArgs, aLoadInfo->GetRequestBlockingReason()); + aLoadInfo->GetDocumentHasLoaded(), cookieSettingsArgs, + aLoadInfo->GetRequestBlockingReason()); } nsresult MergeParentLoadInfoForwarder( @@ -859,10 +855,6 @@ nsresult MergeParentLoadInfoForwarder( aForwarderArgs.documentHasUserInteracted())); MOZ_ALWAYS_SUCCEEDS( aLoadInfo->SetDocumentHasLoaded(aForwarderArgs.documentHasLoaded())); - MOZ_ALWAYS_SUCCEEDS( - aLoadInfo->SetAllowListFutureDocumentsCreatedFromThisRedirectChain( - aForwarderArgs - .allowListFutureDocumentsCreatedFromThisRedirectChain())); MOZ_ALWAYS_SUCCEEDS(aLoadInfo->SetRequestBlockingReason( aForwarderArgs.requestBlockingReason())); diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 972fe9c8b070..741efef9f0db 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -7558,18 +7558,6 @@ value: true mirror: always -# Enable the heuristic to allow storage access for windows opened using window.open() -- name: privacy.restrict3rdpartystorage.heuristic.redirect - type: bool - value: true - mirror: always - -# Anti-tracking permission expiration. -- name: privacy.restrict3rdpartystorage.expiration_redirect - type: uint32_t - value: 900 # 15 minutes - mirror: always - # Anti-tracking user-interaction expiration. - name: privacy.userInteraction.expiration type: uint32_t diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp index 38789f53a4d3..4904b7e15c70 100644 --- a/netwerk/base/LoadInfo.cpp +++ b/netwerk/base/LoadInfo.cpp @@ -100,7 +100,6 @@ LoadInfo::LoadInfo( mServiceWorkerTaintingSynthesized(false), mDocumentHasUserInteracted(false), mDocumentHasLoaded(false), - mAllowListFutureDocumentsCreatedFromThisRedirectChain(false), mSkipContentSniffing(false), mIsFromProcessingFrameAttributes(false) { MOZ_ASSERT(mLoadingPrincipal); @@ -363,7 +362,6 @@ LoadInfo::LoadInfo(nsPIDOMWindowOuter* aOuterWindow, mServiceWorkerTaintingSynthesized(false), mDocumentHasUserInteracted(false), mDocumentHasLoaded(false), - mAllowListFutureDocumentsCreatedFromThisRedirectChain(false), mSkipContentSniffing(false), mIsFromProcessingFrameAttributes(false) { // Top-level loads are never third-party @@ -483,8 +481,6 @@ LoadInfo::LoadInfo(const LoadInfo& rhs) mServiceWorkerTaintingSynthesized(false), mDocumentHasUserInteracted(rhs.mDocumentHasUserInteracted), mDocumentHasLoaded(rhs.mDocumentHasLoaded), - mAllowListFutureDocumentsCreatedFromThisRedirectChain( - rhs.mAllowListFutureDocumentsCreatedFromThisRedirectChain), mCspNonce(rhs.mCspNonce), mSkipContentSniffing(rhs.mSkipContentSniffing), mIsFromProcessingFrameAttributes(rhs.mIsFromProcessingFrameAttributes) {} @@ -520,10 +516,9 @@ LoadInfo::LoadInfo( const nsTArray& aCorsUnsafeHeaders, bool aForcePreflight, bool aIsPreflight, bool aLoadTriggeredFromExternal, bool aServiceWorkerTaintingSynthesized, bool aDocumentHasUserInteracted, - bool aDocumentHasLoaded, - bool aAllowListFutureDocumentsCreatedFromThisRedirectChain, - const nsAString& aCspNonce, bool aSkipContentSniffing, - uint32_t aRequestBlockingReason, nsINode* aLoadingContext) + bool aDocumentHasLoaded, const nsAString& aCspNonce, + bool aSkipContentSniffing, uint32_t aRequestBlockingReason, + nsINode* aLoadingContext) : mLoadingPrincipal(aLoadingPrincipal), mTriggeringPrincipal(aTriggeringPrincipal), mPrincipalToInherit(aPrincipalToInherit), @@ -576,8 +571,6 @@ LoadInfo::LoadInfo( mServiceWorkerTaintingSynthesized(aServiceWorkerTaintingSynthesized), mDocumentHasUserInteracted(aDocumentHasUserInteracted), mDocumentHasLoaded(aDocumentHasLoaded), - mAllowListFutureDocumentsCreatedFromThisRedirectChain( - aAllowListFutureDocumentsCreatedFromThisRedirectChain), mCspNonce(aCspNonce), mSkipContentSniffing(aSkipContentSniffing), mIsFromProcessingFrameAttributes(false) { @@ -1341,20 +1334,6 @@ LoadInfo::SetDocumentHasLoaded(bool aDocumentHasLoaded) { return NS_OK; } -NS_IMETHODIMP -LoadInfo::GetAllowListFutureDocumentsCreatedFromThisRedirectChain( - bool* aValue) { - MOZ_ASSERT(aValue); - *aValue = mAllowListFutureDocumentsCreatedFromThisRedirectChain; - return NS_OK; -} - -NS_IMETHODIMP -LoadInfo::SetAllowListFutureDocumentsCreatedFromThisRedirectChain(bool aValue) { - mAllowListFutureDocumentsCreatedFromThisRedirectChain = aValue; - return NS_OK; -} - NS_IMETHODIMP LoadInfo::GetCspNonce(nsAString& aCspNonce) { aCspNonce = mCspNonce; diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h index d41fba60df0e..fc0c9bbccfff 100644 --- a/netwerk/base/LoadInfo.h +++ b/netwerk/base/LoadInfo.h @@ -157,7 +157,6 @@ class LoadInfo final : public nsILoadInfo { bool aIsPreflight, bool aLoadTriggeredFromExternal, bool aServiceWorkerTaintingSynthesized, bool aDocumentHasUserInteracted, bool aDocumentHasLoaded, - bool aAllowListFutureDocumentsCreatedFromThisRedirectChain, const nsAString& aCspNonce, bool aSkipContentSniffing, uint32_t aRequestBlockingReason, nsINode* aLoadingContext); LoadInfo(const LoadInfo& rhs); @@ -253,7 +252,6 @@ class LoadInfo final : public nsILoadInfo { bool mServiceWorkerTaintingSynthesized; bool mDocumentHasUserInteracted; bool mDocumentHasLoaded; - bool mAllowListFutureDocumentsCreatedFromThisRedirectChain; nsString mCspNonce; bool mSkipContentSniffing; diff --git a/netwerk/base/nsILoadInfo.idl b/netwerk/base/nsILoadInfo.idl index 92fa8bb73105..8d924c0314fc 100644 --- a/netwerk/base/nsILoadInfo.idl +++ b/netwerk/base/nsILoadInfo.idl @@ -1132,16 +1132,6 @@ interface nsILoadInfo : nsISupports */ [infallible] attribute boolean documentHasLoaded; - /** - * During a top-level document channel redirect from tracking to - * non-tracking resources, our anti-tracking heuristic, grants the storage - * access permission for a short amount of seconds (See - * privacy.restrict3rdpartystorage.expiration_redirect pref). - * We use this flag to remember this decision even if this channel is part - * of a chain of redirects. - */ - [infallible] attribute boolean allowListFutureDocumentsCreatedFromThisRedirectChain; - /** * A snapshot of the nonce at load start time which is used for CSP * checks and only set for: diff --git a/netwerk/ipc/NeckoChannelParams.ipdlh b/netwerk/ipc/NeckoChannelParams.ipdlh index 094ebd33b0c7..36b7547a98cb 100644 --- a/netwerk/ipc/NeckoChannelParams.ipdlh +++ b/netwerk/ipc/NeckoChannelParams.ipdlh @@ -142,7 +142,6 @@ struct LoadInfoArgs bool serviceWorkerTaintingSynthesized; bool documentHasUserInteracted; bool documentHasLoaded; - bool allowListFutureDocumentsCreatedFromThisRedirectChain; nsString cspNonce; bool skipContentSniffing; bool isFromProcessingFrameAttributes; @@ -190,7 +189,6 @@ struct ParentLoadInfoForwarderArgs bool documentHasUserInteracted; bool documentHasLoaded; - bool allowListFutureDocumentsCreatedFromThisRedirectChain; CookieSettingsArgs? cookieSettings; diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index bd1eb1f35fe6..edbf1289c904 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -63,7 +63,6 @@ #include "mozilla/ipc/URIUtils.h" #include "mozilla/Telemetry.h" #include "mozilla/Unused.h" -#include "mozilla/AntiTrackingCommon.h" #include "mozilla/BasePrincipal.h" #include "mozilla/LazyIdleThread.h" @@ -824,18 +823,6 @@ void nsHttpHandler::NotifyObservers(nsIChannel* chan, const char* event) { nsresult nsHttpHandler::AsyncOnChannelRedirect( nsIChannel* oldChan, nsIChannel* newChan, uint32_t flags, nsIEventTarget* mainThreadEventTarget) { - MOZ_ASSERT(NS_IsMainThread() && (oldChan && newChan)); - - nsCOMPtr oldURI; - oldChan->GetURI(getter_AddRefs(oldURI)); - MOZ_ASSERT(oldURI); - - nsCOMPtr newURI; - newChan->GetURI(getter_AddRefs(newURI)); - MOZ_ASSERT(newURI); - - AntiTrackingCommon::RedirectHeuristic(oldChan, oldURI, newChan, newURI); - // TODO E10S This helper has to be initialized on the other process RefPtr redirectCallbackHelper = new nsAsyncRedirectVerifyHelper(); diff --git a/toolkit/components/antitracking/AntiTrackingCommon.cpp b/toolkit/components/antitracking/AntiTrackingCommon.cpp index a36e1e9d37b9..bdff34def349 100644 --- a/toolkit/components/antitracking/AntiTrackingCommon.cpp +++ b/toolkit/components/antitracking/AntiTrackingCommon.cpp @@ -30,7 +30,6 @@ #include "nsIPermission.h" #include "nsPermissionManager.h" #include "nsIPrincipal.h" -#include "nsIRedirectHistoryEntry.h" #include "nsIScriptError.h" #include "nsIURI.h" #include "nsIURIFixup.h" @@ -43,7 +42,6 @@ #include "prtime.h" #define ANTITRACKING_PERM_KEY "3rdPartyStorage" -#define ANTITRACKING_CONSOLE_CATEGORY NS_LITERAL_CSTRING("Content Blocking") using namespace mozilla; using mozilla::dom::BrowsingContext; @@ -69,25 +67,6 @@ static const uint32_t kMaxConsoleOutputDelayMs = 100; } \ PR_END_MACRO -#define LOG_SPEC2(format, uri1, uri2) \ - PR_BEGIN_MACRO \ - if (MOZ_LOG_TEST(gAntiTrackingLog, mozilla::LogLevel::Debug)) { \ - nsAutoCString _specStr1(NS_LITERAL_CSTRING("(null)")); \ - _specStr1.Truncate(std::min(_specStr1.Length(), sMaxSpecLength)); \ - if (uri1) { \ - _specStr1 = uri1->GetSpecOrDefault(); \ - } \ - const char* _spec1 = _specStr1.get(); \ - nsAutoCString _specStr2(NS_LITERAL_CSTRING("(null)")); \ - _specStr2.Truncate(std::min(_specStr2.Length(), sMaxSpecLength)); \ - if (uri2) { \ - _specStr2 = uri2->GetSpecOrDefault(); \ - } \ - const char* _spec2 = _specStr2.get(); \ - LOG(format); \ - } \ - PR_END_MACRO - namespace { UniquePtr> @@ -512,9 +491,9 @@ void ReportUnblockingToConsole( } nsContentUtils::ReportToConsole( - nsIScriptError::warningFlag, ANTITRACKING_CONSOLE_CATEGORY, doc, - nsContentUtils::eNECKO_PROPERTIES, messageWithSameOrigin, params, - nullptr, sourceLine, lineNumber, columnNumber); + nsIScriptError::warningFlag, NS_LITERAL_CSTRING("Content Blocking"), + doc, nsContentUtils::eNECKO_PROPERTIES, messageWithSameOrigin, + params, nullptr, sourceLine, lineNumber, columnNumber); }); RunConsoleReportingRunnable(runnable.forget()); @@ -1118,6 +1097,7 @@ AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor( if (XRE_IsParentProcess()) { LOG(("Saving the permission: trackingOrigin=%s", trackingOrigin.get())); + return SaveFirstPartyStorageAccessGrantedForOriginOnParentProcess( topLevelStoragePrincipal, trackingPrincipal, trackingOrigin, aAllowMode) @@ -1178,8 +1158,7 @@ AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor( RefPtr AntiTrackingCommon::SaveFirstPartyStorageAccessGrantedForOriginOnParentProcess( nsIPrincipal* aParentPrincipal, nsIPrincipal* aTrackingPrincipal, - const nsCString& aTrackingOrigin, int aAllowMode, - uint64_t aExpirationTime) { + const nsCString& aTrackingOrigin, int aAllowMode) { MOZ_ASSERT(XRE_IsParentProcess()); MOZ_ASSERT(aAllowMode == eAllow || aAllowMode == eAllowAutoGrant); @@ -1212,7 +1191,8 @@ AntiTrackingCommon::SaveFirstPartyStorageAccessGrantedForOriginOnParentProcess( // Remember that this pref is stored in seconds! uint32_t expirationType = nsIPermissionManager::EXPIRE_TIME; - uint32_t expirationTime = aExpirationTime * 1000; + uint32_t expirationTime = + StaticPrefs::privacy_restrict3rdpartystorage_expiration() * 1000; int64_t when = (PR_Now() / PR_USEC_PER_MSEC) + expirationTime; uint32_t privateBrowsingId = 0; @@ -2291,198 +2271,3 @@ void AntiTrackingCommon::NotifyContentBlockingEvent( aBlocked, aURI, trackingFullHashes, aReason); } - -/* static */ -void AntiTrackingCommon::RedirectHeuristic(nsIChannel* aOldChannel, - nsIURI* aOldURI, - nsIChannel* aNewChannel, - nsIURI* aNewURI) { - MOZ_ASSERT(aOldChannel); - MOZ_ASSERT(aOldURI); - MOZ_ASSERT(aNewChannel); - MOZ_ASSERT(aNewURI); - - nsresult rv; - - if (!StaticPrefs::privacy_restrict3rdpartystorage_heuristic_redirect()) { - return; - } - - nsCOMPtr newChannel = do_QueryInterface(aNewChannel); - if (!newChannel) { - return; - } - - LOG_SPEC(("Checking redirect-heuristic for %s", _spec), aOldURI); - - nsCOMPtr oldLoadInfo = aOldChannel->LoadInfo(); - MOZ_ASSERT(oldLoadInfo); - - nsCOMPtr newLoadInfo = aNewChannel->LoadInfo(); - MOZ_ASSERT(newLoadInfo); - - nsContentPolicyType contentType = oldLoadInfo->GetExternalContentPolicyType(); - if (contentType != nsIContentPolicy::TYPE_DOCUMENT || - !aOldChannel->IsDocument()) { - LOG_SPEC(("Ignoring redirect for %s because it's not a document", _spec), - aOldURI); - // We care about document redirects only. - return; - } - - nsCOMPtr classifiedOldChannel = - do_QueryInterface(aOldChannel); - nsCOMPtr classifiedNewChannel = - do_QueryInterface(aNewChannel); - if (!classifiedOldChannel || !classifiedNewChannel) { - LOG_SPEC2(("Ignoring redirect for %s to %s because there is not " - "nsIClassifiedChannel interface", - _spec1, _spec2), - aOldURI, aNewURI); - return; - } - - bool allowedByPreviousRedirect = - oldLoadInfo->GetAllowListFutureDocumentsCreatedFromThisRedirectChain(); - if (classifiedNewChannel->IsTrackingResource()) { - // This is not a tracking -> non-tracking redirect. - LOG_SPEC2(("Redirect for %s to %s because it's not tracking to " - "non-tracking. Part of a chain of granted redirects: %d", - _spec1, _spec2, allowedByPreviousRedirect), - aOldURI, aNewURI); - newLoadInfo->SetAllowListFutureDocumentsCreatedFromThisRedirectChain( - allowedByPreviousRedirect); - return; - } - - if (!classifiedOldChannel->IsTrackingResource() && - !allowedByPreviousRedirect) { - // This is not a tracking -> non-tracking redirect. - LOG_SPEC2( - ("Redirect for %s to %s because it's not tracking to non-tracking.", - _spec1, _spec2), - aOldURI, aNewURI); - return; - } - - nsIScriptSecurityManager* ssm = - nsScriptSecurityManager::GetScriptSecurityManager(); - MOZ_ASSERT(ssm); - - nsCOMPtr trackingPrincipal; - nsCOMPtr trackingURI; - - if (allowedByPreviousRedirect && !chain.IsEmpty()) { - const nsTArray>& chain = - oldLoadInfo->RedirectChain(); - rv = chain[0]->GetPrincipal(getter_AddRefs(trackingPrincipal)); - if (NS_WARN_IF(NS_FAILED(rv))) { - LOG(("Can't obtain the principal from the redirect chain")); - return; - } - - rv = trackingPrincipal->GetURI(getter_AddRefs(trackingURI)); - if (NS_WARN_IF(NS_FAILED(rv))) { - LOG(("Can't obtain the uri from the redirect chain")); - return; - } - } else { - trackingURI = aOldURI; - rv = ssm->GetChannelResultPrincipal(aOldChannel, - getter_AddRefs(trackingPrincipal)); - if (NS_WARN_IF(NS_FAILED(rv))) { - LOG(("Can't obtain the principal from the tracking")); - return; - } - } - - MOZ_ASSERT(trackingURI); - - nsCOMPtr redirectedPrincipal; - rv = ssm->GetChannelResultPrincipal(aNewChannel, - getter_AddRefs(redirectedPrincipal)); - if (NS_WARN_IF(NS_FAILED(rv))) { - LOG(("Can't obtain the principal from the redirected")); - return; - } - - if (!AntiTrackingCommon::HasUserInteraction(trackingPrincipal)) { - LOG_SPEC2(("Ignoring redirect for %s to %s because no user-interaction on " - "tracker", - _spec1, _spec2), - aOldURI, aNewURI); - return; - } - - nsAutoCString trackingOrigin; - rv = nsContentUtils::GetASCIIOrigin(trackingURI, trackingOrigin); - if (NS_WARN_IF(NS_FAILED(rv))) { - LOG(("Can't get the origin from the URI")); - return; - } - - nsAutoCString redirectedOrigin; - rv = nsContentUtils::GetASCIIOrigin(aNewURI, redirectedOrigin); - if (NS_WARN_IF(NS_FAILED(rv))) { - LOG(("Can't get the origin from the URI")); - return; - } - - LOG(("Adding a first-party storage exception for %s...", - PromiseFlatCString(redirectedOrigin).get())); - - nsCOMPtr cookieSettings; - rv = oldLoadInfo->GetCookieSettings(getter_AddRefs(cookieSettings)); - if (NS_WARN_IF(NS_FAILED(rv))) { - LOG(("Can't get the cookieSettings")); - return; - } - - int32_t behavior = cookieSettings->GetCookieBehavior(); - - if (!cookieSettings->GetRejectThirdPartyTrackers()) { - LOG( - ("Disabled by network.cookie.cookieBehavior pref (%d), bailing out " - "early", - behavior)); - return; - } - - MOZ_ASSERT( - behavior == nsICookieService::BEHAVIOR_REJECT_TRACKER || - behavior == - nsICookieService::BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN); - - if (CheckContentBlockingAllowList(newChannel)) { - return; - } - - LOG(("Saving the permission: trackingOrigin=%s, grantedOrigin=%s", - trackingOrigin.get(), redirectedOrigin.get())); - - // Any new redirect from this loadInfo must be considered as granted. - newLoadInfo->SetAllowListFutureDocumentsCreatedFromThisRedirectChain(true); - - uint64_t innerWindowID; - Unused << newChannel->GetTopLevelContentWindowId(&innerWindowID); - - nsAutoString errorText; - AutoTArray params = {NS_ConvertUTF8toUTF16(redirectedOrigin), - NS_ConvertUTF8toUTF16(trackingOrigin)}; - rv = nsContentUtils::FormatLocalizedString( - nsContentUtils::eNECKO_PROPERTIES, "CookieAllowedForTrackerByHeuristic", - params, errorText); - if (NS_SUCCEEDED(rv)) { - nsContentUtils::ReportToConsoleByWindowID( - errorText, nsIScriptError::warningFlag, ANTITRACKING_CONSOLE_CATEGORY, - innerWindowID); - } - - // We don't care about this promise because the operation is actually sync. - RefPtr promise = - SaveFirstPartyStorageAccessGrantedForOriginOnParentProcess( - redirectedPrincipal, trackingPrincipal, trackingOrigin, - StorageAccessPromptChoices::eAllow, - StaticPrefs::privacy_restrict3rdpartystorage_expiration_redirect()); - Unused << promise; -} diff --git a/toolkit/components/antitracking/AntiTrackingCommon.h b/toolkit/components/antitracking/AntiTrackingCommon.h index 2537d16de38b..b746192eec4c 100644 --- a/toolkit/components/antitracking/AntiTrackingCommon.h +++ b/toolkit/components/antitracking/AntiTrackingCommon.h @@ -10,7 +10,6 @@ #include "nsString.h" #include "mozilla/MozPromise.h" #include "mozilla/RefPtr.h" -#include "mozilla/StaticPrefs_privacy.h" #define USER_INTERACTION_PERM NS_LITERAL_CSTRING("storageAccessAPI") @@ -132,9 +131,7 @@ class AntiTrackingCommon final { static RefPtr SaveFirstPartyStorageAccessGrantedForOriginOnParentProcess( nsIPrincipal* aPrincipal, nsIPrincipal* aTrackingPrinciapl, - const nsCString& aTrackingOrigin, int aAllowMode, - uint64_t aExpirationTime = - StaticPrefs::privacy_restrict3rdpartystorage_expiration()); + const nsCString& aTrackingOrigin, int aAllowMode); // Check whether a top window principal is on the content blocking allow list. static nsresult IsOnContentBlockingAllowList(nsIPrincipal* aTopWinPrincipal, @@ -186,9 +183,6 @@ class AntiTrackingCommon final { nsIChannel* aTrackingChannel, bool aBlocked, uint32_t aRejectedReason, nsIURI* aURI, const Maybe& aReason = Nothing()); - - static void RedirectHeuristic(nsIChannel* aOldChannel, nsIURI* aOldURI, - nsIChannel* aNewChannel, nsIURI* aNewURI); }; } // namespace mozilla