From d3ba71da85c452f76da4a64e058fc73ec5e021fb Mon Sep 17 00:00:00 2001 From: Eugen Sawin Date: Thu, 4 Oct 2018 20:49:31 +0200 Subject: [PATCH] Bug 1495030 - [1.0] Add third-party tracker cookies blocking setting. r=snorp,baku --- .../java/org/mozilla/geckoview/GeckoRuntimeSettings.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java index 5afcce1fa03b..d269834d4b92 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java @@ -587,7 +587,8 @@ public final class GeckoRuntimeSettings implements Parcelable { // 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 {} /** @@ -608,6 +609,12 @@ public final class GeckoRuntimeSettings implements Parcelable { * 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.