2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00

Bug 1861085 - Allow to control extra cookie banner pref in nimbus;

detect only mode, global-rules and global-rules-sub-frames.
This commit is contained in:
Arturo Mejia 2023-10-26 10:33:55 -04:00 committed by mergify[bot]
parent 6ef4e458ef
commit 6350c53531
3 changed files with 34 additions and 3 deletions

View File

@ -243,7 +243,10 @@ features:
{ {
"feature-ui": 0, "feature-ui": 0,
"feature-setting-value": 0, "feature-setting-value": 0,
"feature-setting-value-pbm": 0 "feature-setting-value-pbm": 0,
"feature-setting-detect-only": 0,
"feature-setting-global-rules": 0,
"feature-setting-global-rules-sub-frames": 0
} }
defaults: defaults:
- channel: developer - channel: developer
@ -251,7 +254,10 @@ features:
"sections-enabled": { "sections-enabled": {
"feature-ui": 1, "feature-ui": 1,
"feature-setting-value": 0, "feature-setting-value": 0,
"feature-setting-value-pbm": 0 "feature-setting-value-pbm": 0,
"feature-setting-detect-only": 0,
"feature-setting-global-rules": 0,
"feature-setting-global-rules-sub-frames": 0
} }
} }
- channel: nightly - channel: nightly
@ -259,7 +265,10 @@ features:
"sections-enabled": { "sections-enabled": {
"feature-ui": 1, "feature-ui": 1,
"feature-setting-value": 0, "feature-setting-value": 0,
"feature-setting-value-pbm": 0 "feature-setting-value-pbm": 0,
"feature-setting-detect-only": 0,
"feature-setting-global-rules": 0,
"feature-setting-global-rules-sub-frames": 0
} }
} }
unified-search: unified-search:
@ -459,6 +468,16 @@ types:
feature-setting-value-pbm: feature-setting-value-pbm:
description: An integer either 0 or 1 indicating if cookie banner setting should be enabled or disabled, description: An integer either 0 or 1 indicating if cookie banner setting should be enabled or disabled,
0 for setting the value to disabled, 1 for enabling the setting with the value reject_all. 0 for setting the value to disabled, 1 for enabling the setting with the value reject_all.
feature-setting-detect-only:
description: An integer either 0 or 1 indicating if cookie banner detect only mode
should be enabled or disabled. 0 for setting to be disabled, and 1 for enabling the setting.
feature-setting-global-rules:
description: An integer either 0 or 1 indicating if cookie banner global rules
should be enabled or disabled. 0 for setting to be disabled, and 1 for enabling the setting.
feature-setting-global-rules-sub-frames:
description: An integer either 0 or 1 indicating if cookie banner global rules sub-frames
should be enabled or disabled. 0 for setting to be disabled, and 1 for enabling the setting.
OnboardingPanel: OnboardingPanel:
description: The types of onboarding panels in the onboarding page description: The types of onboarding panels in the onboarding page
variants: variants:

View File

@ -144,6 +144,9 @@ class Core(
httpsOnlyMode = context.settings().getHttpsOnlyMode(), httpsOnlyMode = context.settings().getHttpsOnlyMode(),
cookieBannerHandlingModePrivateBrowsing = context.settings().getCookieBannerHandlingPrivateMode(), cookieBannerHandlingModePrivateBrowsing = context.settings().getCookieBannerHandlingPrivateMode(),
cookieBannerHandlingMode = context.settings().getCookieBannerHandling(), cookieBannerHandlingMode = context.settings().getCookieBannerHandling(),
cookieBannerHandlingDetectOnlyMode = context.settings().shouldEnableCookieBannerDetectOnly,
cookieBannerHandlingGlobalRules = context.settings().shouldEnableCookieBannerGlobalRules,
cookieBannerHandlingGlobalRulesSubFrames = context.settings().shouldEnableCookieBannerGlobalRulesSubFrame,
) )
GeckoEngine( GeckoEngine(

View File

@ -625,6 +625,15 @@ class Settings(private val appContext: Context) : PreferencesHolder {
val shouldShowCookieBannerUI: Boolean val shouldShowCookieBannerUI: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1 get() = cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1
val shouldEnableCookieBannerDetectOnly: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_SETTING_DETECT_ONLY] == 1
val shouldEnableCookieBannerGlobalRules: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES] == 1
val shouldEnableCookieBannerGlobalRulesSubFrame: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES_SUB_FRAMES] == 1
/** /**
* Declared as a function for performance purposes. This could be declared as a variable using * Declared as a function for performance purposes. This could be declared as a variable using
* booleanPreference like other members of this class. However, doing so will make it so it will * booleanPreference like other members of this class. However, doing so will make it so it will