Backed out 2 changesets (bug 1504728, bug 1505198) for xpcshell failures on test_WebExtensionContentScript.js. CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 16 Nov 2018 02:34:15 +0200
changeset 446690 2ecf840a17dd94bb13a11b62736b8cc7c65782df
parent 446689 1abdc7367834b8dfc8e0606bf688f11a901730d3
child 446691 bfa775531d0d04e8707eb3630c7370b192d82887
push id35046
push userbtara@mozilla.com
push dateFri, 16 Nov 2018 09:46:36 +0000
treeherdermozilla-central@02f799e4c3da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1504728, 1505198
milestone65.0a1
backs out26318538f0778f8e6efc7fe266f6b2ce8143f37c
fc39602006bef09c1046e73658abe9158efe886b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1504728, bug 1505198) for xpcshell failures on test_WebExtensionContentScript.js. CLOSED TREE Backed out changeset 26318538f077 (bug 1505198) Backed out changeset fc39602006be (bug 1504728)
browser/base/content/test/general/browser_alltabslistener.js
browser/base/content/test/performance/browser_preferences_usage.js
browser/base/content/test/siteIdentity/browser_ignore_same_page_navigation.js
browser/base/content/test/trackingUI/browser_trackingUI_animation_2.js
browser/base/content/test/trackingUI/browser_trackingUI_telemetry.js
docshell/base/nsDocShell.cpp
docshell/base/nsIDocShell.idl
dom/base/ContentBlockingLog.h
dom/base/Navigator.cpp
dom/base/nsContentUtils.cpp
dom/base/nsGlobalWindowOuter.cpp
dom/base/nsIDocument.h
netwerk/base/SimpleChannelParent.cpp
netwerk/base/nsIParentChannel.idl
netwerk/cookie/nsCookieService.cpp
netwerk/cookie/nsCookieService.h
netwerk/protocol/data/DataChannelParent.cpp
netwerk/protocol/file/FileChannelParent.cpp
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/http/HttpBackgroundChannelChild.cpp
netwerk/protocol/http/HttpBackgroundChannelChild.h
netwerk/protocol/http/HttpBackgroundChannelParent.cpp
netwerk/protocol/http/HttpBackgroundChannelParent.h
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelChild.h
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/PHttpBackgroundChannel.ipdl
netwerk/protocol/http/nsHttpChannel.cpp
security/manager/ssl/nsSecureBrowserUIImpl.cpp
toolkit/components/antitracking/AntiTrackingCommon.cpp
toolkit/components/antitracking/AntiTrackingCommon.h
toolkit/components/antitracking/test/browser/browser_subResources.js
toolkit/components/antitracking/test/browser/head.js
uriloader/base/nsIWebProgressListener.idl
uriloader/exthandler/nsExternalProtocolHandler.cpp
--- a/browser/base/content/test/general/browser_alltabslistener.js
+++ b/browser/base/content/test/general/browser_alltabslistener.js
@@ -114,56 +114,52 @@ function runTest(browser, url, next) {
 
 function startTest1() {
   info("\nTest 1");
   gBrowser.addProgressListener(gFrontProgressListener);
   gBrowser.addTabsProgressListener(gAllProgressListener);
 
   gAllNotifications = [
     "onStateChange",
-    "onSecurityChange",
     "onLocationChange",
     "onSecurityChange",
     "onStateChange",
   ];
   gFrontNotifications = gAllNotifications;
   runTest(gForegroundBrowser, "http://example.org" + gTestPage, startTest2);
 }
 
 function startTest2() {
   info("\nTest 2");
   gAllNotifications = [
     "onStateChange",
-    "onSecurityChange",
     "onLocationChange",
     "onSecurityChange",
     "onStateChange",
   ];
   gFrontNotifications = gAllNotifications;
   runTest(gForegroundBrowser, "https://example.com" + gTestPage, startTest3);
 }
 
 function startTest3() {
   info("\nTest 3");
   gAllNotifications = [
     "onStateChange",
-    "onSecurityChange",
     "onLocationChange",
     "onSecurityChange",
     "onStateChange",
   ];
   gFrontNotifications = [];
   runTest(gBackgroundBrowser, "http://example.org" + gTestPage, startTest4);
 }
 
 function startTest4() {
   info("\nTest 4");
   gAllNotifications = [
     "onStateChange",
-    "onSecurityChange",
     "onLocationChange",
     "onSecurityChange",
     "onStateChange",
   ];
   gFrontNotifications = [];
   runTest(gBackgroundBrowser, "https://example.com" + gTestPage, startTest5);
 }
 
@@ -174,30 +170,28 @@ function startTest5() {
   [gForegroundTab, gBackgroundTab] = [gBackgroundTab, gForegroundTab];
   // Avoid the onLocationChange this will fire
   gBrowser.removeProgressListener(gFrontProgressListener);
   gBrowser.selectedTab = gForegroundTab;
   gBrowser.addProgressListener(gFrontProgressListener);
 
   gAllNotifications = [
     "onStateChange",
-    "onSecurityChange",
     "onLocationChange",
     "onSecurityChange",
     "onStateChange",
   ];
   gFrontNotifications = gAllNotifications;
   runTest(gForegroundBrowser, "http://example.org" + gTestPage, startTest6);
 }
 
 function startTest6() {
   info("\nTest 6");
   gAllNotifications = [
     "onStateChange",
-    "onSecurityChange",
     "onLocationChange",
     "onSecurityChange",
     "onStateChange",
   ];
   gFrontNotifications = [];
   runTest(gBackgroundBrowser, "http://example.org" + gTestPage, finishTest);
 }
 
--- a/browser/base/content/test/performance/browser_preferences_usage.js
+++ b/browser/base/content/test/performance/browser_preferences_usage.js
@@ -184,29 +184,29 @@ add_task(async function navigate_around(
       min: 100,
       max: 110,
     },
     "network.loadinfo.skip_type_assertion": {
       // This is accessed in debug only.
     },
     "security.insecure_connection_icon.pbmode.enabled": {
       min: 20,
-      max: 60,
+      max: 30,
     },
     "security.insecure_connection_icon.enabled": {
       min: 20,
-      max: 60,
+      max: 30,
     },
     "security.insecure_connection_text.enabled": {
       min: 20,
-      max: 60,
+      max: 30,
     },
     "security.insecure_connection_text.pbmode.enabled": {
       min: 20,
-      max: 60,
+      max: 30,
     },
     "toolkit.cosmeticAnimations.enabled": {
       min: 45,
       max: 55,
     },
   };
 
   Services.prefs.resetStats();
--- a/browser/base/content/test/siteIdentity/browser_ignore_same_page_navigation.js
+++ b/browser/base/content/test/siteIdentity/browser_ignore_same_page_navigation.js
@@ -26,16 +26,16 @@ add_task(async function() {
     };
     browser.addProgressListener(progressListener, Ci.nsIWebProgress.NOTIFY_ALL);
 
     let uri = getRootDirectory(gTestPath).replace("chrome://mochitests/content",
                                                   "https://example.com") + "dummy_page.html";
     BrowserTestUtils.loadURI(browser, uri);
     await BrowserTestUtils.browserLoaded(browser, false, uri);
     is(onLocationChangeCount, 1, "should have 1 onLocationChange event");
-    is(onSecurityChangeCount, 2, "should have 2 onSecurityChange event");
+    is(onSecurityChangeCount, 1, "should have 1 onSecurityChange event");
     await ContentTask.spawn(browser, null, async () => {
       content.history.pushState({}, "", "https://example.com");
     });
     is(onLocationChangeCount, 2, "should have 2 onLocationChange events");
-    is(onSecurityChangeCount, 2, "should still have only 2 onSecurityChange event");
+    is(onSecurityChangeCount, 1, "should still have only 1 onSecurityChange event");
   });
 });
--- a/browser/base/content/test/trackingUI/browser_trackingUI_animation_2.js
+++ b/browser/base/content/test/trackingUI/browser_trackingUI_animation_2.js
@@ -6,18 +6,16 @@
 
 const TP_PREF = "privacy.trackingprotection.enabled";
 const TP_PB_PREF = "privacy.trackingprotection.enabled";
 const NCB_PREF = "network.cookie.cookieBehavior";
 const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/trackingUI/benignPage.html";
 const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/trackingUI/trackingPage.html";
 const COOKIE_PAGE = "http://tracking.example.org/browser/browser/base/content/test/trackingUI/cookiePage.html";
 
-requestLongerTimeout(2);
-
 registerCleanupFunction(function() {
   UrlClassifierTestUtils.cleanupTestTrackers();
   Services.prefs.clearUserPref(TP_PREF);
   Services.prefs.clearUserPref(TP_PB_PREF);
   Services.prefs.clearUserPref(NCB_PREF);
   Services.prefs.clearUserPref(ContentBlocking.prefIntroCount);
 });
 
@@ -80,36 +78,36 @@ async function testTrackingProtectionAni
   securityChanged = waitForSecurityChange(tabbrowser);
   tabbrowser.selectedTab = trackingCookiesTab;
   await securityChanged;
 
   ok(ContentBlocking.iconBox.hasAttribute("active"), "iconBox active");
   ok(!ContentBlocking.iconBox.hasAttribute("animate"), "iconBox not animating");
 
   info("Reload tracking cookies tab");
-  securityChanged = waitForSecurityChange(tabbrowser, 4);
+  securityChanged = waitForSecurityChange(tabbrowser, 2);
   tabbrowser.reload();
   await securityChanged;
 
   ok(ContentBlocking.iconBox.hasAttribute("active"), "iconBox active");
   ok(ContentBlocking.iconBox.hasAttribute("animate"), "iconBox animating");
   await BrowserTestUtils.waitForEvent(ContentBlocking.animatedIcon, "animationend");
 
   info("Reload tracking tab");
-  securityChanged = waitForSecurityChange(tabbrowser, 5);
+  securityChanged = waitForSecurityChange(tabbrowser, 3);
   tabbrowser.selectedTab = trackingTab;
   tabbrowser.reload();
   await securityChanged;
 
   ok(ContentBlocking.iconBox.hasAttribute("active"), "iconBox active");
   ok(ContentBlocking.iconBox.hasAttribute("animate"), "iconBox animating");
   await BrowserTestUtils.waitForEvent(ContentBlocking.animatedIcon, "animationend");
 
   info("Inject tracking cookie inside tracking tab");
-  securityChanged = waitForSecurityChange(tabbrowser, 2);
+  securityChanged = waitForSecurityChange(tabbrowser);
   await ContentTask.spawn(tabbrowser.selectedBrowser, {},
                           function() {
     content.postMessage("cookie", "*");
   });
   await securityChanged;
 
   ok(ContentBlocking.iconBox.hasAttribute("active"), "iconBox active");
   ok(!ContentBlocking.iconBox.hasAttribute("animate"), "iconBox not animating");
@@ -123,28 +121,28 @@ async function testTrackingProtectionAni
   await securityChanged;
 
   ok(ContentBlocking.iconBox.hasAttribute("active"), "iconBox active");
   ok(!ContentBlocking.iconBox.hasAttribute("animate"), "iconBox not animating");
 
   tabbrowser.selectedTab = trackingCookiesTab;
 
   info("Inject tracking cookie inside tracking cookies tab");
-  securityChanged = waitForSecurityChange(tabbrowser, 2);
+  securityChanged = waitForSecurityChange(tabbrowser);
   await ContentTask.spawn(tabbrowser.selectedBrowser, {},
                           function() {
     content.postMessage("cookie", "*");
   });
   await securityChanged;
 
   ok(ContentBlocking.iconBox.hasAttribute("active"), "iconBox active");
   ok(!ContentBlocking.iconBox.hasAttribute("animate"), "iconBox not animating");
 
   info("Inject tracking element inside tracking cookies tab");
-  securityChanged = waitForSecurityChange(tabbrowser, 2);
+  securityChanged = waitForSecurityChange(tabbrowser);
   await ContentTask.spawn(tabbrowser.selectedBrowser, {},
                           function() {
     content.postMessage("tracking", "*");
   });
   await securityChanged;
 
   ok(ContentBlocking.iconBox.hasAttribute("active"), "iconBox active");
   ok(!ContentBlocking.iconBox.hasAttribute("animate"), "iconBox not animating");
--- a/browser/base/content/test/trackingUI/browser_trackingUI_telemetry.js
+++ b/browser/base/content/test/trackingUI/browser_trackingUI_telemetry.js
@@ -46,17 +46,17 @@ add_task(async function setup() {
 add_task(async function testShieldHistogram() {
   Services.prefs.setBoolPref(PREF, true);
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
 
   // Reset these to make counting easier
   getShieldHistogram().clear();
 
   await promiseTabLoadEvent(tab, BENIGN_PAGE);
-  is(getShieldCounts()[0], 2, "Page loads without tracking");
+  is(getShieldCounts()[0], 1, "Page loads without tracking");
 
   await promiseTabLoadEvent(tab, TRACKING_PAGE);
   // Note that right now the shield histogram is not measuring what
   // you might think.  Since onSecurityChange fires twice for a tracking page,
   // the total page loads count is double counting, and the shield count
   // (which is meant to measure times when the shield wasn't shown) fires even
   // when tracking elements exist on the page.
   todo_is(getShieldCounts()[0], 1, "FIXME: TOTAL PAGE LOADS WITHOUT TRACKING IS DOUBLE COUNTING");
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -1507,24 +1507,16 @@ NS_IMETHODIMP
 nsDocShell::GetHasForeignCookiesBeenBlocked(bool* aHasForeignCookiesBeenBlocked)
 {
   nsCOMPtr<nsIDocument> doc(GetDocument());
   *aHasForeignCookiesBeenBlocked = doc && doc->GetHasForeignCookiesBlocked();
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDocShell::GetHasCookiesLoaded(bool* aHasCookiesLoaded)
-{
-  nsCOMPtr<nsIDocument> doc(GetDocument());
-  *aHasCookiesLoaded = doc && doc->GetHasCookiesLoaded();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsDocShell::GetAllowPlugins(bool* aAllowPlugins)
 {
   NS_ENSURE_ARG_POINTER(aAllowPlugins);
 
   *aAllowPlugins = mAllowPlugins;
   return NS_OK;
 }
 
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -644,22 +644,16 @@ interface nsIDocShell : nsIDocShellTreeI
    [infallible] readonly attribute boolean hasAllCookiesBeenBlocked;
 
    /**
    * This attribute determines whether a document seen cookies or storage
    * blocked due to cookie behavior settings blocking all third-party cookies.
    */
    [infallible] readonly attribute boolean hasForeignCookiesBeenBlocked;
 
-   /**
-   * This attribute determines whether a document seen cookies or storage
-   * attempts ever whether they've been allowed or blocked.
-   */
-   [infallible] readonly attribute boolean hasCookiesLoaded;
-
   /**
    * Disconnects this docshell's editor from its window, and stores the
    * editor data in the open document's session history entry.  This
    * should be called only during page transitions.
    */
   [noscript, notxpcom] void DetachEditorFromWindow();
 
   /**
--- a/dom/base/ContentBlockingLog.h
+++ b/dom/base/ContentBlockingLog.h
@@ -3,19 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_ContentBlockingLog_h
 #define mozilla_dom_ContentBlockingLog_h
 
 #include "mozilla/JSONWriter.h"
-#include "mozilla/Maybe.h"
 #include "mozilla/StaticPrefs.h"
-#include "mozilla/Tuple.h"
 #include "mozilla/UniquePtr.h"
 #include "nsClassHashtable.h"
 #include "nsHashKeys.h"
 #include "nsReadableUtils.h"
 #include "nsTArray.h"
 #include "nsWindowSizes.h"
 
 namespace mozilla {
@@ -27,17 +25,17 @@ class ContentBlockingLog final
     uint32_t mType;
     uint32_t mRepeatCount;
     bool mBlocked;
   };
 
   // Each element is a tuple of (type, blocked, repeatCount). The type values
   // come from the blocking types defined in nsIWebProgressListener.
   typedef nsTArray<LogEntry> OriginLog;
-  typedef Tuple<bool, Maybe<bool>, OriginLog> OriginData;
+  typedef Pair<bool, OriginLog> OriginData;
   typedef nsClassHashtable<nsStringHashKey, OriginData> OriginDataHashTable;
 
   struct StringWriteFunc : public JSONWriteFunc
   {
     nsAString& mBuffer; // The lifetime of the struct must be bound to the buffer
     explicit StringWriteFunc(nsAString& aBuffer)
       : mBuffer(aBuffer)
     {}
@@ -56,28 +54,20 @@ public:
   {
     if (aOrigin.IsVoid()) {
       return;
     }
     auto entry = mLog.LookupForAdd(aOrigin);
     if (entry) {
       auto& data = entry.Data();
       if (aType == nsIWebProgressListener::STATE_LOADED_TRACKING_CONTENT) {
-        Get<0>(*data) = aBlocked;
+        data->first() = aBlocked;
         return;
       }
-      if (aType == nsIWebProgressListener::STATE_COOKIES_LOADED) {
-        if (Get<1>(*data).isSome()) {
-          Get<1>(*data).ref() = aBlocked;
-        } else {
-          Get<1>(*data).emplace(aBlocked);
-        }
-        return;
-      }
-      auto& log = Get<2>(*data);
+      auto& log = data->second();
       if (!log.IsEmpty()) {
         auto& last = log.LastElement();
         if (last.mType == aType &&
             last.mBlocked == aBlocked) {
           ++last.mRepeatCount;
           // Don't record recorded events.  This helps compress our log.
           return;
         }
@@ -85,27 +75,21 @@ public:
       if (log.Length() ==
             std::max(1u, StaticPrefs::browser_contentblocking_originlog_length())) {
         // Cap the size at the maximum length adjustable by the pref
         log.RemoveElementAt(0);
       }
       log.AppendElement(LogEntry{aType, 1u, aBlocked});
     } else {
       entry.OrInsert([=] {
-        nsAutoPtr<OriginData> data(new OriginData(false, Maybe<bool>(), OriginLog()));
+        nsAutoPtr<OriginData> data(new OriginData(false, OriginLog()));
         if (aType == nsIWebProgressListener::STATE_LOADED_TRACKING_CONTENT) {
-          Get<0>(*data) = aBlocked;
-        } else if (aType == nsIWebProgressListener::STATE_COOKIES_LOADED) {
-          if (Get<1>(*data).isSome()) {
-            Get<1>(*data).ref() = aBlocked;
-          } else {
-            Get<1>(*data).emplace(aBlocked);
-          }
+          data->first() = true;
         } else {
-          Get<2>(*data).AppendElement(LogEntry{aType, 1u, aBlocked});
+          data->second().AppendElement(LogEntry{aType, 1u, aBlocked});
         }
         return data.forget();
       });
     }
   }
 
   nsAutoString Stringify()
   {
@@ -118,35 +102,26 @@ public:
       if (!iter.UserData()) {
         w.StartArrayProperty(NS_ConvertUTF16toUTF8(iter.Key()).get(), w.SingleLineStyle);
         w.EndArray();
         continue;
       }
 
       w.StartArrayProperty(NS_ConvertUTF16toUTF8(iter.Key()).get(), w.SingleLineStyle);
       auto& data = *iter.UserData();
-      if (Get<0>(data)) {
+      if (data.first()) {
         w.StartArrayElement(w.SingleLineStyle);
         {
           w.IntElement(nsIWebProgressListener::STATE_LOADED_TRACKING_CONTENT);
           w.BoolElement(true); // blocked
           w.IntElement(1);     // repeat count
         }
         w.EndArray();
       }
-      if (Get<1>(data).isSome()) {
-        w.StartArrayElement(w.SingleLineStyle);
-        {
-          w.IntElement(nsIWebProgressListener::STATE_COOKIES_LOADED);
-          w.BoolElement(Get<1>(data).value()); // blocked
-          w.IntElement(1);                     // repeat count
-        }
-        w.EndArray();
-      }
-      for (auto& item: Get<2>(data)) {
+      for (auto& item: data.second()) {
         w.StartArrayElement(w.SingleLineStyle);
         {
           w.IntElement(item.mType);
           w.BoolElement(item.mBlocked);
           w.IntElement(item.mRepeatCount);
         }
         w.EndArray();
       }
@@ -161,26 +136,21 @@ public:
   bool HasBlockedAnyOfType(uint32_t aType)
   {
     for (auto iter = mLog.Iter(); !iter.Done(); iter.Next()) {
       if (!iter.UserData()) {
         continue;
       }
 
       if (aType == nsIWebProgressListener::STATE_LOADED_TRACKING_CONTENT) {
-        if (Get<0>(*iter.UserData())) {
+        if (iter.UserData()->first()) {
           return true;
         }
-      } else if (aType == nsIWebProgressListener::STATE_COOKIES_LOADED) {
-        if (Get<1>(*iter.UserData()).isSome()) {
-          return Get<1>(*iter.UserData()).value();
-        }
-        return true; // true means blocked, aka not loaded any cookies
       } else {
-        for (auto& item: Get<2>(*iter.UserData())) {
+        for (auto& item: iter.UserData()->second()) {
           if ((item.mType & aType) != 0) {
             return true;
           }
         }
       }
     }
     return false;
   }
@@ -191,17 +161,17 @@ public:
 
     // Now add the sizes of each origin log queue.
     // The const_cast is needed because the nsTHashtable::Iterator interface is
     // not const-safe.  :-(
     for (auto iter = const_cast<OriginDataHashTable&>(mLog).Iter();
          !iter.Done(); iter.Next()) {
       if (iter.UserData()) {
         aSizes.mDOMOtherSize +=
-          Get<2>(*iter.UserData()).ShallowSizeOfIncludingThis(aSizes.mState.mMallocSizeOf);
+          iter.UserData()->second().ShallowSizeOfIncludingThis(aSizes.mState.mMallocSizeOf);
       }
     }
   }
 
 private:
   OriginDataHashTable mLog;
 };
 
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -539,27 +539,26 @@ Navigator::CookieEnabled()
 
   if (!codebaseURI) {
     // Not a codebase, so technically can't set cookies, but let's
     // just return the default value.
     return cookieEnabled;
   }
 
   uint32_t rejectedReason = 0;
-  bool granted =
-    AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(mWindow,
-                                                            codebaseURI,
-                                                            &rejectedReason);
+  if (AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(mWindow,
+                                                              codebaseURI,
+                                                              &rejectedReason)) {
+    return true;
+  }
 
-  AntiTrackingCommon::NotifyBlockingDecision(mWindow,
-                                             granted ?
-                                               AntiTrackingCommon::BlockingDecision::eAllow :
-                                               AntiTrackingCommon::BlockingDecision::eBlock,
-                                             rejectedReason);
-  return granted;
+  if (rejectedReason) {
+    AntiTrackingCommon::NotifyRejection(mWindow, rejectedReason);
+  }
+  return false;
 }
 
 bool
 Navigator::OnLine()
 {
   return !NS_IsOffline();
 }
 
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -8951,29 +8951,21 @@ nsContentUtils::StorageDisabledByAntiTra
                                               nsIChannel* aChannel,
                                               nsIPrincipal* aPrincipal,
                                               nsIURI* aURI)
 {
   uint32_t rejectedReason = 0;
   bool disabled =
     StorageDisabledByAntiTrackingInternal(aWindow, aChannel, aPrincipal, aURI,
                                           &rejectedReason);
-  if (sAntiTrackingControlCenterUIEnabled) {
+  if (disabled && sAntiTrackingControlCenterUIEnabled && rejectedReason) {
     if (aWindow) {
-      AntiTrackingCommon::NotifyBlockingDecision(aWindow,
-                                                 disabled ?
-                                                   AntiTrackingCommon::BlockingDecision::eBlock :
-                                                   AntiTrackingCommon::BlockingDecision::eAllow,
-                                                 rejectedReason);
+      AntiTrackingCommon::NotifyRejection(aWindow, rejectedReason);
     } else if (aChannel) {
-      AntiTrackingCommon::NotifyBlockingDecision(aChannel,
-                                                 disabled ?
-                                                   AntiTrackingCommon::BlockingDecision::eBlock :
-                                                   AntiTrackingCommon::BlockingDecision::eAllow,
-                                                 rejectedReason);
+      AntiTrackingCommon::NotifyRejection(aChannel, rejectedReason);
     }
   }
   return disabled;
 }
 
 // static, private
 nsContentUtils::StorageAccess
 nsContentUtils::InternalStorageAllowedForPrincipal(nsIPrincipal* aPrincipal,
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -5370,24 +5370,16 @@ nsGlobalWindowOuter::NotifyContentBlocki
     if (!aBlocked) {
       unblocked = !doc->GetHasAllCookiesBlocked();
     }
   } else if (aState == nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN) {
     doc->SetHasForeignCookiesBlocked(aBlocked, origin);
     if (!aBlocked) {
       unblocked = !doc->GetHasForeignCookiesBlocked();
     }
-  } else if (aState == nsIWebProgressListener::STATE_COOKIES_LOADED) {
-    MOZ_ASSERT(!aBlocked, "We don't expected to see blocked STATE_COOKIES_LOADED");
-    // Note that the logic in this branch is the logical negation of the logic
-    // in other branches, since the nsIDocument API we have is phrased in
-    // "loaded" terms as opposed to "blocked" terms.
-    doc->SetHasCookiesLoaded(!aBlocked, origin);
-    aBlocked = true;
-    unblocked = false;
   } else {
     // Ignore nsIWebProgressListener::STATE_BLOCKED_UNSAFE_CONTENT;
   }
   const uint32_t oldState = state;
   if (aBlocked) {
     state |= aState;
   } else if (unblocked) {
     state &= ~aState;
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -1107,36 +1107,16 @@ public:
                                         const nsAString& aOriginBlocked)
   {
     RecordContentBlockingLog(aOriginBlocked,
                              nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION,
                              aHasCookiesBlockedByPermission);
   }
 
   /**
-   * Set the cookies loaded flag for this document.
-   */
-  void SetHasCookiesLoaded(bool aHasCookiesLoaded,
-                           const nsAString& aOriginLoaded)
-  {
-    RecordContentBlockingLog(aOriginLoaded,
-                             nsIWebProgressListener::STATE_COOKIES_LOADED,
-                             aHasCookiesLoaded);
-  }
-
-  /**
-   * Get cookies loaded flag for this document.
-   */
-  bool GetHasCookiesLoaded()
-  {
-    return mContentBlockingLog.HasBlockedAnyOfType(
-        nsIWebProgressListener::STATE_COOKIES_LOADED);
-  }
-
-  /**
    * Get tracking content loaded flag for this document.
    */
   bool GetHasTrackingContentLoaded()
   {
     return mContentBlockingLog.HasBlockedAnyOfType(
         nsIWebProgressListener::STATE_LOADED_TRACKING_CONTENT);
   }
 
--- a/netwerk/base/SimpleChannelParent.cpp
+++ b/netwerk/base/SimpleChannelParent.cpp
@@ -34,23 +34,16 @@ SimpleChannelParent::SetParentListener(H
 NS_IMETHODIMP
 SimpleChannelParent::NotifyTrackingProtectionDisabled()
 {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
-SimpleChannelParent::NotifyCookieAllowed()
-{
-  // Nothing to do.
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 SimpleChannelParent::NotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SimpleChannelParent::NotifyTrackingResource(bool aIsThirdParty)
--- a/netwerk/base/nsIParentChannel.idl
+++ b/netwerk/base/nsIParentChannel.idl
@@ -30,22 +30,16 @@ interface nsIParentChannel : nsIStreamLi
 
   /**
    * Called to notify the HttpChannelChild that tracking protection was
    * disabled for this load.
    */
   [noscript] void notifyTrackingProtectionDisabled();
 
   /**
-   * Called to notify the HttpChannelChild that cookie has been allowed for
-   * this load.
-   */
-  [noscript] void notifyCookieAllowed();
-
-  /**
    * Called to notify the HttpChannelChild that cookie has been blocked for
    * this load.
    */
   [noscript] void notifyTrackingCookieBlocked(in uint32_t aRejectedReason);
 
    /**
    * Called to set matched information when URL matches SafeBrowsing list.
    * @param aList
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -2264,17 +2264,16 @@ nsCookieService::SetCookieStringInternal
     if (aIsForeign) {
       NotifyThirdParty(aHostURI, false, aChannel);
     }
     return; // Stop here
   case STATUS_REJECTED_WITH_ERROR:
     return;
   case STATUS_ACCEPTED: // Fallthrough
   case STATUS_ACCEPT_SESSION:
-    NotifyAccepted(aChannel);
     if (aIsForeign) {
       NotifyThirdParty(aHostURI, true, aChannel);
     }
     break;
   default:
     break;
   }
 
@@ -2284,37 +2283,27 @@ nsCookieService::SetCookieStringInternal
   while (SetCookieInternal(aHostURI, key, requireHostMatch, cookieStatus,
                            aCookieHeader, serverTime, aFromHttp, aChannel)) {
     // document.cookie can only set one cookie at a time
     if (!aFromHttp)
       break;
   }
 }
 
-void
-nsCookieService::NotifyAccepted(nsIChannel* aChannel)
-{
-  AntiTrackingCommon::NotifyBlockingDecision(aChannel,
-                                             AntiTrackingCommon::BlockingDecision::eAllow,
-                                             0);
-}
-
 // notify observers that a cookie was rejected due to the users' prefs.
 void
 nsCookieService::NotifyRejected(nsIURI *aHostURI, nsIChannel* aChannel,
                                 uint32_t aRejectedReason)
 {
   nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
   if (os) {
     os->NotifyObservers(aHostURI, "cookie-rejected", nullptr);
   }
 
-  AntiTrackingCommon::NotifyBlockingDecision(aChannel,
-                                             AntiTrackingCommon::BlockingDecision::eBlock,
-                                             aRejectedReason);
+  AntiTrackingCommon::NotifyRejection(aChannel, aRejectedReason);
 }
 
 // notify observers that a third-party cookie was accepted/rejected
 // if the cookie issuer is unknown, it defaults to "?"
 void
 nsCookieService::NotifyThirdParty(nsIURI *aHostURI, bool aIsAccepted, nsIChannel *aChannel)
 {
   nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
--- a/netwerk/cookie/nsCookieService.h
+++ b/netwerk/cookie/nsCookieService.h
@@ -314,17 +314,16 @@ class nsCookieService final : public nsI
     static bool                   CheckPrefixes(nsCookieAttributes &aCookie, bool aSecureRequest);
     static bool                   GetExpiry(nsCookieAttributes &aCookie, int64_t aServerTime, int64_t aCurrentTime);
     void                          RemoveAllFromMemory();
     already_AddRefed<nsIArray>    PurgeCookies(int64_t aCurrentTimeInUsec);
     bool                          FindCookie(const nsCookieKey& aKey, const nsCString& aHost, const nsCString& aName, const nsCString& aPath, nsListIter &aIter);
     bool                          FindSecureCookie(const nsCookieKey& aKey, nsCookie* aCookie);
     void                          FindStaleCookies(nsCookieEntry *aEntry, int64_t aCurrentTime, const mozilla::Maybe<bool> &aIsSecure, nsTArray<nsListIter>& aOutput, uint32_t aLimit);
     void                          TelemetryForEvictingStaleCookie(nsCookie* aEvicted, int64_t oldestCookieTime);
-    void                          NotifyAccepted(nsIChannel* aChannel);
     void                          NotifyRejected(nsIURI *aHostURI, nsIChannel* aChannel, uint32_t aRejectedReason);
     void                          NotifyThirdParty(nsIURI *aHostURI, bool aAccepted, nsIChannel *aChannel);
     void                          NotifyChanged(nsISupports *aSubject, const char16_t *aData, bool aOldCookieIsSession = false, bool aFromHttp = false);
     void                          NotifyPurged(nsICookie2* aCookie);
     already_AddRefed<nsIArray>    CreatePurgeList(nsICookie2* aCookie);
     void                          CreateOrUpdatePurgeList(nsIArray** aPurgeList, nsICookie2* aCookie);
     void                          UpdateCookieOldestTime(DBState* aDBState, nsCookie* aCookie);
 
--- a/netwerk/protocol/data/DataChannelParent.cpp
+++ b/netwerk/protocol/data/DataChannelParent.cpp
@@ -34,23 +34,16 @@ DataChannelParent::SetParentListener(Htt
 NS_IMETHODIMP
 DataChannelParent::NotifyTrackingProtectionDisabled()
 {
     // Nothing to do.
     return NS_OK;
 }
 
 NS_IMETHODIMP
-DataChannelParent::NotifyCookieAllowed()
-{
-    // Nothing to do.
-    return NS_OK;
-}
-
-NS_IMETHODIMP
 DataChannelParent::NotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
     // Nothing to do.
     return NS_OK;
 }
 
 NS_IMETHODIMP
 DataChannelParent::NotifyTrackingResource(bool aIsThirdParty)
--- a/netwerk/protocol/file/FileChannelParent.cpp
+++ b/netwerk/protocol/file/FileChannelParent.cpp
@@ -34,23 +34,16 @@ FileChannelParent::SetParentListener(Htt
 NS_IMETHODIMP
 FileChannelParent::NotifyTrackingProtectionDisabled()
 {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
-FileChannelParent::NotifyCookieAllowed()
-{
-  // Nothing to do.
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 FileChannelParent::NotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 FileChannelParent::NotifyTrackingResource(bool aIsThirdParty)
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -573,23 +573,16 @@ FTPChannelParent::SetParentListener(Http
 NS_IMETHODIMP
 FTPChannelParent::NotifyTrackingProtectionDisabled()
 {
   // One day, this should probably be filled in.
   return NS_OK;
 }
 
 NS_IMETHODIMP
-FTPChannelParent::NotifyCookieAllowed()
-{
-  // One day, this should probably be filled in.
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 FTPChannelParent::NotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
   // One day, this should probably be filled in.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 FTPChannelParent::NotifyTrackingResource(bool aIsThirdParty)
--- a/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
+++ b/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
@@ -344,31 +344,16 @@ HttpBackgroundChannelChild::RecvNotifyTr
   // NotifyTrackingProtectionDisabled has no order dependency to OnStartRequest.
   // It this be handled as soon as possible
   mChannelChild->ProcessNotifyTrackingProtectionDisabled();
 
   return IPC_OK();
 }
 
 IPCResult
-HttpBackgroundChannelChild::RecvNotifyCookieAllowed()
-{
-  LOG(("HttpBackgroundChannelChild::RecvNotifyCookieAllowed [this=%p]\n", this));
-  MOZ_ASSERT(OnSocketThread());
-
-  if (NS_WARN_IF(!mChannelChild)) {
-    return IPC_OK();
-  }
-
-  mChannelChild->ProcessNotifyCookieAllowed();
-
-  return IPC_OK();
-}
-
-IPCResult
 HttpBackgroundChannelChild::RecvNotifyTrackingCookieBlocked(const uint32_t& aRejectedReason)
 {
   LOG(("HttpBackgroundChannelChild::RecvNotifyTrackingCookieBlocked [this=%p]\n", this));
   MOZ_ASSERT(OnSocketThread());
 
   if (NS_WARN_IF(!mChannelChild)) {
     return IPC_OK();
   }
--- a/netwerk/protocol/http/HttpBackgroundChannelChild.h
+++ b/netwerk/protocol/http/HttpBackgroundChannelChild.h
@@ -60,18 +60,16 @@ protected:
   IPCResult RecvFlushedForDiversion() override;
 
   IPCResult RecvDivertMessages() override;
 
   IPCResult RecvOnStartRequestSent() override;
 
   IPCResult RecvNotifyTrackingProtectionDisabled() override;
 
-  IPCResult RecvNotifyCookieAllowed() override;
-
   IPCResult RecvNotifyTrackingCookieBlocked(const uint32_t& aRejectedReason) override;
 
   IPCResult RecvNotifyTrackingResource(const bool& aIsThirdParty) override;
 
   IPCResult RecvSetClassifierMatchedInfo(const ClassifierInfo& info) override;
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
--- a/netwerk/protocol/http/HttpBackgroundChannelParent.cpp
+++ b/netwerk/protocol/http/HttpBackgroundChannelParent.cpp
@@ -375,45 +375,16 @@ HttpBackgroundChannelParent::OnNotifyTra
 
     return NS_SUCCEEDED(rv);
   }
 
   return SendNotifyTrackingProtectionDisabled();
 }
 
 bool
-HttpBackgroundChannelParent::OnNotifyCookieAllowed()
-{
-  LOG(("HttpBackgroundChannelParent::OnNotifyCookieAllowed [this=%p]\n", this));
-  AssertIsInMainProcess();
-
-  if (NS_WARN_IF(!mIPCOpened)) {
-    return false;
-  }
-
-  if (!IsOnBackgroundThread()) {
-    MutexAutoLock lock(mBgThreadMutex);
-    RefPtr<HttpBackgroundChannelParent> self = this;
-    nsresult rv = mBackgroundThread->Dispatch(
-      NS_NewRunnableFunction(
-        "net::HttpBackgroundChannelParent::OnNotifyCookieAllowed",
-        [self]() {
-          self->OnNotifyCookieAllowed();
-        }),
-      NS_DISPATCH_NORMAL);
-
-    MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
-
-    return NS_SUCCEEDED(rv);
-  }
-
-  return SendNotifyCookieAllowed();
-}
-
-bool
 HttpBackgroundChannelParent::OnNotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
   LOG(("HttpBackgroundChannelParent::OnNotifyTrackingCookieBlocked [this=%p]\n", this));
   AssertIsInMainProcess();
 
   if (NS_WARN_IF(!mIPCOpened)) {
     return false;
   }
--- a/netwerk/protocol/http/HttpBackgroundChannelParent.h
+++ b/netwerk/protocol/http/HttpBackgroundChannelParent.h
@@ -64,19 +64,16 @@ public:
 
   // To send FlushedForDiversion and DivertMessages messages
   // over background channel.
   bool OnDiversion();
 
   // To send NotifyTrackingProtectionDisabled message over background channel.
   bool OnNotifyTrackingProtectionDisabled();
 
-  // To send NotifyCookieAllowed message over background channel.
-  bool OnNotifyCookieAllowed();
-
   // To send NotifyTrackingCookieBlocked message over background channel.
   bool OnNotifyTrackingCookieBlocked(uint32_t aRejectedReason);
 
   // To send NotifyTrackingResource message over background channel.
   bool OnNotifyTrackingResource(bool aIsThirdParty);
 
   // To send SetClassifierMatchedInfo message over background channel.
   bool OnSetClassifierMatchedInfo(const nsACString& aList,
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -2046,49 +2046,28 @@ HttpChannelChild::ProcessNotifyTrackingP
       "nsChannelClassifier::NotifyTrackingProtectionDisabled",
       [self]() {
         nsChannelClassifier::NotifyTrackingProtectionDisabled(self);
       }),
     NS_DISPATCH_NORMAL);
 }
 
 void
-HttpChannelChild::ProcessNotifyCookieAllowed()
-{
-  LOG(("HttpChannelChild::ProcessNotifyCookieAllowed [this=%p]\n", this));
-  MOZ_ASSERT(OnSocketThread());
-
-  RefPtr<HttpChannelChild> self = this;
-  nsCOMPtr<nsIEventTarget> neckoTarget = GetNeckoTarget();
-  neckoTarget->Dispatch(
-    NS_NewRunnableFunction(
-      "nsChannelClassifier::NotifyBlockingDecision",
-      [self]() {
-        AntiTrackingCommon::NotifyBlockingDecision(self,
-                                                   AntiTrackingCommon::BlockingDecision::eAllow,
-                                                   0);
-      }),
-    NS_DISPATCH_NORMAL);
-}
-
-void
 HttpChannelChild::ProcessNotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
   LOG(("HttpChannelChild::ProcessNotifyTrackingCookieBlocked [this=%p]\n", this));
   MOZ_ASSERT(OnSocketThread());
 
   RefPtr<HttpChannelChild> self = this;
   nsCOMPtr<nsIEventTarget> neckoTarget = GetNeckoTarget();
   neckoTarget->Dispatch(
     NS_NewRunnableFunction(
       "nsChannelClassifier::NotifyTrackingCookieBlocked",
       [self, aRejectedReason]() {
-        AntiTrackingCommon::NotifyBlockingDecision(self,
-                                                   AntiTrackingCommon::BlockingDecision::eBlock,
-                                                   aRejectedReason);
+        AntiTrackingCommon::NotifyRejection(self, aRejectedReason);
       }),
     NS_DISPATCH_NORMAL);
 }
 
 void
 HttpChannelChild::ProcessNotifyTrackingResource(bool aIsThirdParty)
 {
   LOG(("HttpChannelChild::ProcessNotifyTrackingResource thirdparty=%d "
--- a/netwerk/protocol/http/HttpChannelChild.h
+++ b/netwerk/protocol/http/HttpChannelChild.h
@@ -254,17 +254,16 @@ private:
   void ProcessOnStopRequest(const nsresult& aStatusCode,
                             const ResourceTimingStruct& aTiming,
                             const nsHttpHeaderArray& aResponseTrailers);
   void ProcessOnProgress(const int64_t& aProgress, const int64_t& aProgressMax);
   void ProcessOnStatus(const nsresult& aStatus);
   void ProcessFlushedForDiversion();
   void ProcessDivertMessages();
   void ProcessNotifyTrackingProtectionDisabled();
-  void ProcessNotifyCookieAllowed();
   void ProcessNotifyTrackingCookieBlocked(uint32_t aRejectedReason);
   void ProcessNotifyTrackingResource(bool aIsThirdParty);
   void ProcessSetClassifierMatchedInfo(const nsCString& aList,
                                        const nsCString& aProvider,
                                        const nsCString& aFullHash);
 
   // Return true if we need to tell the parent the size of unreported received
   // data
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1899,27 +1899,16 @@ HttpChannelParent::NotifyTrackingProtect
   if (!mIPCClosed) {
     MOZ_ASSERT(mBgParent);
     Unused << NS_WARN_IF(!mBgParent->OnNotifyTrackingProtectionDisabled());
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HttpChannelParent::NotifyCookieAllowed()
-{
-  LOG(("HttpChannelParent::NotifyCookieAllowed [this=%p]\n", this));
-  if (!mIPCClosed) {
-    MOZ_ASSERT(mBgParent);
-    Unused << NS_WARN_IF(!mBgParent->OnNotifyCookieAllowed());
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 HttpChannelParent::NotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
   LOG(("HttpChannelParent::NotifyTrackingCookieBlocked [this=%p]\n", this));
   if (!mIPCClosed) {
     MOZ_ASSERT(mBgParent);
     Unused << NS_WARN_IF(!mBgParent->OnNotifyTrackingCookieBlocked(aRejectedReason));
   }
   return NS_OK;
--- a/netwerk/protocol/http/PHttpBackgroundChannel.ipdl
+++ b/netwerk/protocol/http/PHttpBackgroundChannel.ipdl
@@ -51,19 +51,16 @@ child:
 
   // Child should resume processing the ChannelEventQueue, i.e. diverting any
   // OnDataAvailable and OnStopRequest messages in the queue back to the parent.
   async DivertMessages();
 
   // Tell the child that tracking protection was disabled for this load.
   async NotifyTrackingProtectionDisabled();
 
-  // Tell the child that cookies are allowed for this load.
-  async NotifyCookieAllowed();
-
   // Tell the child that tracking cookies are blocked for this load.
   async NotifyTrackingCookieBlocked(uint32_t aRejectedReason);
 
   // Tell the child that the resource being loaded is on the tracking
   // protection list.
   async NotifyTrackingResource(bool aIsThirdParty);
 
   // Tell the child information of matched URL againts SafeBrowsing list
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -827,28 +827,22 @@ nsHttpChannel::CheckFastBlocked()
 nsresult
 nsHttpChannel::ConnectOnTailUnblock()
 {
     nsresult rv;
 
     LOG(("nsHttpChannel::ConnectOnTailUnblock [this=%p]\n", this));
 
     bool isTrackingResource = mIsThirdPartyTrackingResource; // is atomic
-    if (isTrackingResource) {
-        bool engageFastBlock = CheckFastBlocked();
-        AntiTrackingCommon::NotifyBlockingDecision(this,
-                                                   engageFastBlock ?
-                                                     AntiTrackingCommon::BlockingDecision::eBlock :
-                                                     AntiTrackingCommon::BlockingDecision::eAllow,
-                                                   nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT);
-        if (engageFastBlock) {
-          Unused << AsyncAbort(NS_ERROR_TRACKING_ANNOTATION_URI);
-          CloseCacheEntry(false);
-          return NS_OK;
-        }
+    if (isTrackingResource && CheckFastBlocked()) {
+        AntiTrackingCommon::NotifyRejection(this,
+                                            nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT);
+        Unused << AsyncAbort(NS_ERROR_TRACKING_ANNOTATION_URI);
+        CloseCacheEntry(false);
+        return NS_OK;
     }
 
     // Consider opening a TCP connection right away.
     SpeculativeConnect();
 
     // open a cache entry for this channel...
     bool isHttps = false;
     rv = mURI->SchemeIs("https", &isHttps);
--- a/security/manager/ssl/nsSecureBrowserUIImpl.cpp
+++ b/security/manager/ssl/nsSecureBrowserUIImpl.cpp
@@ -203,20 +203,16 @@ nsSecureBrowserUIImpl::CheckForBlockedCo
 
   if (docShell->GetHasForeignCookiesBeenBlocked()) {
     mState |= STATE_COOKIES_BLOCKED_FOREIGN;
   }
 
   if (docShell->GetHasAllCookiesBeenBlocked()) {
     mState |= STATE_COOKIES_BLOCKED_ALL;
   }
-
-  if (docShell->GetHasCookiesLoaded()) {
-    mState |= STATE_COOKIES_LOADED;
-  }
 }
 
 // Helper function to determine if the given URI can be considered secure.
 // Essentially, only "https" URIs can be considered secure. However, the URI we
 // have may be e.g. view-source:https://example.com or
 // wyciwyg://https://example.com, in which case we have to evaluate the
 // innermost URI.
 static nsresult
--- a/toolkit/components/antitracking/AntiTrackingCommon.cpp
+++ b/toolkit/components/antitracking/AntiTrackingCommon.cpp
@@ -224,18 +224,17 @@ CheckContentBlockingAllowList(nsIHttpCha
   return false;
 }
 
 void
 ReportBlockingToConsole(nsPIDOMWindowOuter* aWindow, nsIURI* aURI,
                         uint32_t aRejectedReason)
 {
   MOZ_ASSERT(aWindow && aURI);
-  MOZ_ASSERT(aRejectedReason == 0 ||
-             aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION ||
+  MOZ_ASSERT(aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_ALL ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN ||
              aRejectedReason == nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT);
 
   nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell();
   if (NS_WARN_IF(!docShell)) {
     return;
@@ -490,17 +489,17 @@ AntiTrackingCommon::AddFirstPartyStorage
 
   // We hardcode this block reason since the first-party storage access permission
   // is granted for the purpose of blocking trackers.
   const uint32_t blockReason = nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER;
   if (!HasUserInteraction(trackingPrincipal)) {
     LOG_SPEC(("Tracking principal (%s) hasn't been interacted with before, "
               "refusing to add a first-party storage permission to access it",
               _spec), trackingURI);
-    NotifyBlockingDecision(aParentWindow, BlockingDecision::eBlock, blockReason);
+    NotifyRejection(aParentWindow, blockReason);
     return StorageAccessGrantPromise::CreateAndReject(false, __func__);
   }
 
   nsCOMPtr<nsPIDOMWindowOuter> pwin = GetTopWindow(parentWindow);
   if (!pwin) {
     LOG(("Couldn't get the top window"));
     return StorageAccessGrantPromise::CreateAndReject(false, __func__);
   }
@@ -1201,51 +1200,36 @@ AntiTrackingCommon::IsOnContentBlockingA
   if (!aIsAllowListed) {
     LOG(("No user override found"));
   }
 
   return NS_OK;
 }
 
 /* static */ void
-AntiTrackingCommon::NotifyBlockingDecision(nsIChannel* aChannel,
-                                           BlockingDecision aDecision,
-                                           uint32_t aRejectedReason)
+AntiTrackingCommon::NotifyRejection(nsIChannel* aChannel,
+                                    uint32_t aRejectedReason)
 {
-  MOZ_ASSERT(aRejectedReason == 0 ||
-             aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION ||
+  MOZ_ASSERT(aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_ALL ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN ||
              aRejectedReason == nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT);
-  MOZ_ASSERT(aDecision == BlockingDecision::eBlock ||
-             aDecision == BlockingDecision::eAllow);
 
   if (!aChannel) {
     return;
   }
 
-  // When we allow loads, collapse all cookie related reason codes into STATE_COOKIES_LOADED.
-  bool sendCookieLoadedNotification = false;
-  if (aRejectedReason != nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT) {
-    sendCookieLoadedNotification = true;
-  }
-
   // Can be called in EITHER the parent or child process.
   nsCOMPtr<nsIParentChannel> parentChannel;
   NS_QueryNotificationCallbacks(aChannel, parentChannel);
   if (parentChannel) {
     // This channel is a parent-process proxy for a child process request.
     // Tell the child process channel to do this instead.
-    if (aDecision == BlockingDecision::eBlock) {
-      parentChannel->NotifyTrackingCookieBlocked(aRejectedReason);
-    } else {
-      // Ignore the code related to fastblock
-      parentChannel->NotifyCookieAllowed();
-    }
+    parentChannel->NotifyTrackingCookieBlocked(aRejectedReason);
     return;
   }
 
   nsCOMPtr<mozIThirdPartyUtil> thirdPartyUtil = services::GetThirdPartyUtil();
   if (!thirdPartyUtil) {
     return;
   }
 
@@ -1257,48 +1241,32 @@ AntiTrackingCommon::NotifyBlockingDecisi
   nsCOMPtr<nsPIDOMWindowOuter> pwin = nsPIDOMWindowOuter::From(win);
   if (!pwin) {
     return;
   }
 
   nsCOMPtr<nsIURI> uri;
   aChannel->GetURI(getter_AddRefs(uri));
 
-  if (aDecision == BlockingDecision::eBlock) {
-    pwin->NotifyContentBlockingState(aRejectedReason, aChannel, true, uri);
+  pwin->NotifyContentBlockingState(aRejectedReason, aChannel, true, uri);
 
-    ReportBlockingToConsole(pwin, uri, aRejectedReason);
-  }
-
-  if (sendCookieLoadedNotification) {
-    pwin->NotifyContentBlockingState(nsIWebProgressListener::STATE_COOKIES_LOADED,
-                                     aChannel, false, uri);
-  }
+  ReportBlockingToConsole(pwin, uri, aRejectedReason);
 }
 
 /* static */ void
-AntiTrackingCommon::NotifyBlockingDecision(nsPIDOMWindowInner* aWindow,
-                                           BlockingDecision aDecision,
-                                           uint32_t aRejectedReason)
+AntiTrackingCommon::NotifyRejection(nsPIDOMWindowInner* aWindow,
+                                    uint32_t aRejectedReason)
 {
   MOZ_ASSERT(aWindow);
-  MOZ_ASSERT(aRejectedReason == 0 ||
-             aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION ||
+  MOZ_ASSERT(aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_ALL ||
              aRejectedReason == nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN ||
              aRejectedReason == nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT);
-  MOZ_ASSERT(aDecision == BlockingDecision::eBlock ||
-             aDecision == BlockingDecision::eAllow);
 
-  // When we allow loads, collapse all cookie related reason codes into STATE_COOKIES_LOADED.
-  bool sendCookieLoadedNotification = false;
-  if (aRejectedReason != nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT) {
-    sendCookieLoadedNotification = true;
-  }
 
   nsCOMPtr<nsPIDOMWindowOuter> pwin = GetTopWindow(aWindow);
   if (!pwin) {
     return;
   }
 
   nsPIDOMWindowInner* inner = pwin->GetCurrentInnerWindow();
   if (!inner) {
@@ -1314,26 +1282,19 @@ AntiTrackingCommon::NotifyBlockingDecisi
   }
 
   nsIDocument* document = aWindow->GetExtantDoc();
   if (!document) {
     return;
   }
   nsIURI* uri = document->GetDocumentURI();
 
-  if (aDecision == BlockingDecision::eBlock) {
-    pwin->NotifyContentBlockingState(aRejectedReason, channel, true, uri);
+  pwin->NotifyContentBlockingState(aRejectedReason, channel, true, uri);
 
-    ReportBlockingToConsole(pwin, uri, aRejectedReason);
-  }
-
-  if (sendCookieLoadedNotification) {
-    pwin->NotifyContentBlockingState(nsIWebProgressListener::STATE_COOKIES_LOADED,
-                                     channel, false, uri);
-  }
+  ReportBlockingToConsole(pwin, uri, aRejectedReason);
 }
 
 /* static */ void
 AntiTrackingCommon::StoreUserInteractionFor(nsIPrincipal* aPrincipal)
 {
   if (XRE_IsParentProcess()) {
     nsCOMPtr<nsIURI> uri;
     Unused << aPrincipal->GetURI(getter_AddRefs(uri));
--- a/toolkit/components/antitracking/AntiTrackingCommon.h
+++ b/toolkit/components/antitracking/AntiTrackingCommon.h
@@ -124,38 +124,28 @@ public:
 
   // Check whether a top window URI is on the content blocking allow list.
   static nsresult
   IsOnContentBlockingAllowList(nsIURI* aTopWinURI,
                                bool aIsPrivateBrowsing,
                                ContentBlockingAllowListPurpose aPurpose,
                                bool& aIsAllowListed);
 
-  enum class BlockingDecision {
-    eBlock,
-    eAllow,
-  };
-
   // This method can be called on the parent process or on the content process.
   // The notification is propagated to the child channel if aChannel is a parent
   // channel proxy.
   //
-  // aDecision can be eBlock if we have decided to block some content, or eAllow
-  // if we have decided to allow the content through.
-  //
   // aRejectedReason must be one of these values:
   //  * nsIWebProgressListener::STATE_COOKIES_BLOCKED_BY_PERMISSION
   //  * nsIWebProgressListener::STATE_COOKIES_BLOCKED_TRACKER
   //  * nsIWebProgressListener::STATE_COOKIES_BLOCKED_ALL
   //  * nsIWebProgressListener::STATE_COOKIES_BLOCKED_FOREIGN
   //  * nsIWebProgressListener::STATE_BLOCKED_SLOW_TRACKING_CONTENT
   static void
-  NotifyBlockingDecision(nsIChannel* aChannel, BlockingDecision aDecision,
-                         uint32_t aRejectedReason);
+  NotifyRejection(nsIChannel* aChannel, uint32_t aRejectedReason);
 
   static void
-  NotifyBlockingDecision(nsPIDOMWindowInner* aWindow, BlockingDecision aDecision,
-                         uint32_t aRejectedReason);
+  NotifyRejection(nsPIDOMWindowInner* aWindow, uint32_t aRejectedReason);
 };
 
 } // namespace mozilla
 
 #endif // mozilla_antitrackingservice_h
--- a/toolkit/components/antitracking/test/browser/browser_subResources.js
+++ b/toolkit/components/antitracking/test/browser/browser_subResources.js
@@ -151,52 +151,39 @@ add_task(async function() {
     });
 
   await fetch("https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/subResources.sjs?result&what=script")
     .then(r => r.text())
     .then(text => {
       is(text, 1, "One cookie received received for scripts.");
     });
 
-  let expectTrackerBlocked = (item, blocked) => {
-    is(item[0], Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER,
-       "Correct blocking type reported");
-    is(item[1], blocked,
-       "Correct blocking status reported");
-    ok(item[2] >= 1,
-       "Correct repeat count reported");
-  };
-
-  let expectTrackerFound = item => {
-    is(item[0], Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT,
-       "Correct blocking type reported");
-    is(item[1], true,
-       "Correct blocking status reported");
-    ok(item[2] >= 1,
-       "Correct repeat count reported");
-  };
-
-  let expectCookiesLoaded = item => {
-    is(item[0], Ci.nsIWebProgressListener.STATE_COOKIES_LOADED,
-       "Correct blocking type reported");
-    is(item[1], true,
-       "Correct blocking status reported");
-    ok(item[2] >= 1,
-       "Correct repeat count reported");
-  };
-
   let log = JSON.parse(await browser.getContentBlockingLog());
   for (let trackerOrigin in log) {
     is(trackerOrigin, TEST_3RD_PARTY_DOMAIN, "Correct tracker origin must be reported");
     let originLog = log[trackerOrigin];
-    is(originLog.length, 4, "We should have 4 entries in the compressed log");
-    expectTrackerFound(originLog[0]);
-    expectCookiesLoaded(originLog[1]);
-    expectTrackerBlocked(originLog[2], true);
-    expectTrackerBlocked(originLog[3], false);
+    is(originLog.length, 3, "We should have 3 entries in the compressed log");
+    is(originLog[0][0], Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT,
+       "Correct blocking type reported");
+    is(originLog[0][1], true,
+       "Correct blocking status reported");
+    ok(originLog[0][2] >= 1,
+       "Correct repeat count reported");
+    is(originLog[1][0], Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER,
+       "Correct blocking type reported");
+    is(originLog[1][1], true,
+       "Correct blocking status reported");
+    is(originLog[1][2], 6,
+       "Correct repeat count reported");
+    is(originLog[2][0], Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER,
+       "Correct blocking type reported");
+    is(originLog[2][1], false,
+       "Correct blocking status reported");
+    ok(originLog[2][2] >= 1,
+       "Correct repeat count reported");
   }
 
   info("Removing the tab");
   BrowserTestUtils.removeTab(tab);
 });
 
 add_task(async function() {
   info("Cleaning up.");
--- a/toolkit/components/antitracking/test/browser/head.js
+++ b/toolkit/components/antitracking/test/browser/head.js
@@ -360,26 +360,20 @@ this.AntiTracking = {
                "When not blocking, old state should not have had the " +
                "STATE_COOKIES_BLOCKED_TRACKER bit");
             // Ensure that if there is something in the content blocking log, it's only
             // STATE_LOADED_TRACKING_CONTENT notifications.
             for (let trackerOrigin in contentBlockingLog) {
               let originLog = contentBlockingLog[trackerOrigin];
               for (let i = 0; i < originLog.length; ++i) {
                 let item = originLog[i];
-                switch (item[0]) {
-                case Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT:
-                  is(item[1], true, "Correct blocking status reported");
-                  ok(item[2] >= 1, "Correct repeat count reported");
-                  break;
-                case Ci.nsIWebProgressListener.STATE_COOKIES_LOADED:
-                  is(item[1], true, "Correct blocking status reported");
-                  ok(item[2] >= 1, "Correct repeat count reported");
-                  break;
-                }
+                is(item[0], Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT,
+                   "Correct blocking type must be reported");
+                is(item[1], true, "Correct blocking status reported");
+                ok(item[2] >= 1, "Correct repeat count reported");
               }
             }
           }
         },
       };
       win.gBrowser.addProgressListener(listener);
 
       info("Creating a new tab");
@@ -549,21 +543,30 @@ this.AntiTracking = {
           if (state & Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER) {
             ++cookieBlocked;
           }
           let contentBlockingLog = {};
           try {
             contentBlockingLog = JSON.parse(contentBlockingLogJSON);
           } catch (e) {
           }
+          // If this is the first cookie to be blocked, our state should have
+          // just changed, otherwise it should have previously contained the
+          // STATE_COOKIES_BLOCKED_TRACKER bit too.
           if (cookieBlocked) {
+            if (cookieBlocked == 1) {
+              is(oldState & Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER, 0,
+                 "When blocking the first cookie, old state should not have had the " +
+                 "STATE_COOKIES_BLOCKED_TRACKER bit");
+            }
+
             for (let trackerOrigin in contentBlockingLog) {
               is(trackerOrigin, TEST_3RD_PARTY_DOMAIN, "Correct tracker origin must be reported");
               let originLog = contentBlockingLog[trackerOrigin];
-              ok(originLog.length >= 1, "We should have at least two items in the log");
+              ok(originLog.length > 1, "We should have at least two items in the log");
               for (let i = 0; i < originLog.length; ++i) {
                 let item = originLog[i];
                 switch (item[0]) {
                 case Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT:
                   is(item[1], true, "Correct blocking status reported");
                   ok(item[2] >= 1, "Correct repeat count reported");
                   break;
                 case Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT:
@@ -575,20 +578,16 @@ this.AntiTracking = {
                   break;
                 case Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER:
                   if (item[1]) {
                     ok(item[2] >= 1, "Correct repeat count reported");
                   } else {
                     is(item[2], 1, "Correct repeat count reported");
                   }
                   break;
-                case Ci.nsIWebProgressListener.STATE_COOKIES_LOADED:
-                  is(item[1], true, "Correct blocking status reported");
-                  ok(item[2] >= 1, "Correct repeat count reported");
-                  break;
                 }
               }
             }
             // Can't assert the number of tracker origins because we may get 0
             // for web progress navigations coming from the window opening...
           }
         },
       };
@@ -692,47 +691,40 @@ this.AntiTracking = {
           if (expectedBlockingNotifications && cookieBlocked) {
             if (cookieBlocked == 1) {
               is(oldState & expectedBlockingNotifications, 0,
                  "When blocking the first cookie, old state should not have had " +
                  "one of the blocking flag bit");
             }
 
             for (let trackerOrigin in contentBlockingLog) {
+              is(trackerOrigin, TEST_3RD_PARTY_DOMAIN, "Correct tracker origin must be reported");
               let originLog = contentBlockingLog[trackerOrigin];
-              ok(originLog.length >= 1, "We should have at least two items in the log");
+              ok(originLog.length > 1, "We should have at least two items in the log");
               for (let i = 0; i < originLog.length; ++i) {
                 let item = originLog[i];
                 switch (item[0]) {
                 case Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT:
-                  is(trackerOrigin, TEST_3RD_PARTY_DOMAIN, "Correct tracker origin must be reported");
                   is(item[1], true, "Correct blocking status reported");
                   ok(item[2] >= 1, "Correct repeat count reported");
                   break;
                 case Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT:
-                  is(trackerOrigin, TEST_3RD_PARTY_DOMAIN, "Correct tracker origin must be reported");
                   if (item[1]) {
                     ok(item[2] >= 1, "Correct repeat count reported");
                   } else {
                     // This branch is needed here because of the tests that use the storage
                     // access API to gain storage access.
                     is(item[2], 1, "Correct repeat count reported");
                   }
                   break;
                 case Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER:
-                  is(trackerOrigin, TEST_3RD_PARTY_DOMAIN, "Correct tracker origin must be reported");
                   // We can expect 1 or more repeat count whether or not blocking has happened,
                   // so nothing to assert on item[1].
                   ok(item[2] >= 1, "Correct repeat count reported");
                   break;
-                case Ci.nsIWebProgressListener.STATE_COOKIES_LOADED:
-                  // The trackerOrigin here is sometimes TEST_DOMAIN, sometimes TEST_3RD_PARTY_DOMAIN.
-                  is(item[1], true, "Correct blocking status reported");
-                  ok(item[2] >= 1, "Correct repeat count reported");
-                  break;
                 }
               }
             }
             // Can't assert the number of tracker origins because we may get 0
             // for web progress navigations coming from the window opening...
           }
         },
       };
--- a/uriloader/base/nsIWebProgressListener.idl
+++ b/uriloader/base/nsIWebProgressListener.idl
@@ -322,17 +322,16 @@ interface nsIWebProgressListener : nsISu
    *   Rejected because cookie policy blocks all cookies.
    *
    * STATE_COOKIES_BLOCKED_FOREIGN
    *   Rejected because cookie policy blocks 3rd party cookies.
    *
    * STATE_BLOCKED_SLOW_TRACKING_CONTENT
    *   Rejected because of the FastBlock feature.
    */
-  const unsigned long STATE_COOKIES_LOADED                = 0x00008000;
   const unsigned long STATE_COOKIES_BLOCKED_BY_PERMISSION = 0x10000000;
   const unsigned long STATE_COOKIES_BLOCKED_TRACKER       = 0x20000000;
   const unsigned long STATE_COOKIES_BLOCKED_ALL           = 0x40000000;
   const unsigned long STATE_COOKIES_BLOCKED_FOREIGN       = 0x00000080;
   const unsigned long STATE_BLOCKED_SLOW_TRACKING_CONTENT = 0x00000040;
 
   /**
    * Notification indicating the state has changed for one of the requests
--- a/uriloader/exthandler/nsExternalProtocolHandler.cpp
+++ b/uriloader/exthandler/nsExternalProtocolHandler.cpp
@@ -417,22 +417,16 @@ NS_IMETHODIMP nsExtProtocolChannel::SetP
 }
 
 NS_IMETHODIMP nsExtProtocolChannel::NotifyTrackingProtectionDisabled()
 {
   // nothing to do
   return NS_OK;
 }
 
-NS_IMETHODIMP nsExtProtocolChannel::NotifyCookieAllowed()
-{
-  // nothing to do
-  return NS_OK;
-}
-
 NS_IMETHODIMP nsExtProtocolChannel::NotifyTrackingCookieBlocked(uint32_t aRejectedReason)
 {
   // nothing to do
   return NS_OK;
 }
 
 NS_IMETHODIMP nsExtProtocolChannel::SetClassifierMatchedInfo(const nsACString& aList,
                                                              const nsACString& aProvider,