Bug 1495030 - [1.0] Add third-party tracker cookies blocking setting. r=snorp,baku
authorEugen Sawin <esawin@mozilla.com>
Thu, 04 Oct 2018 20:49:31 +0200
changeset 439814 8dcf2e242b3aee77099c6370a0c25e009c5838ef
parent 439813 be99865efc836bcf19491ad6f1a62c47f279cf28
child 439815 1638774724799ea8eb692868a2c501d088839a2c
push id34791
push usertoros@mozilla.com
push dateFri, 05 Oct 2018 21:44:32 +0000
treeherdermozilla-central@54cb6a2f028b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, baku
bugs1495030
milestone64.0a1
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
Bug 1495030 - [1.0] Add third-party tracker cookies blocking setting. r=snorp,baku
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java
@@ -582,17 +582,18 @@ public final class GeckoRuntimeSettings 
         final GeckoBundle data = new GeckoBundle(1);
         data.putString("languageTag", mLocale);
         EventDispatcher.getInstance().dispatch("GeckoView:SetLocale", data);
     }
 
     // Sync values with nsICookieService.idl.
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({ COOKIE_ACCEPT_ALL, COOKIE_ACCEPT_FIRST_PARTY,
-              COOKIE_ACCEPT_NONE, COOKIE_ACCEPT_VISITED })
+              COOKIE_ACCEPT_NONE, COOKIE_ACCEPT_VISITED,
+              COOKIE_ACCEPT_NON_TRACKERS })
     /* package */ @interface CookieBehavior {}
 
     /**
      * Accept first-party and third-party cookies and site data.
      */
     public static final int COOKIE_ACCEPT_ALL = 0;
     /**
      * Accept only first-party cookies and site data to block cookies which are
@@ -603,16 +604,22 @@ public final class GeckoRuntimeSettings 
      * Do not store any cookies and site data.
      */
     public static final int COOKIE_ACCEPT_NONE = 2;
     /**
      * Accept first-party and third-party cookies and site data only from
      * sites previously visited in a first-party context.
      */
     public static final int COOKIE_ACCEPT_VISITED = 3;
+    /**
+     * Accept only first-party and non-tracking third-party cookies and site data
+     * to block cookies which are not associated with the domain of the visited
+     * site set by known trackers.
+     */
+    public static final int COOKIE_ACCEPT_NON_TRACKERS = 4;
 
     /**
      * Get the assigned cookie storage behavior.
      *
      * @return The assigned behavior, as one of {@link #COOKIE_ACCEPT_ALL COOKIE_ACCEPT_*} flags.
      */
     public @CookieBehavior int getCookieBehavior() {
         return mCookieBehavior.get();