mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-09 19:10:42 +00:00
Updated tracking protectionPolicy to the recommend one.
This commit is contained in:
parent
93d0982a6f
commit
b2294483a8
@ -55,5 +55,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- #1599 - Fixed a crash creating a bookmark for a custom tab
|
||||
- #1414 - Fixed site permissions settings getting reset in Android 6.
|
||||
- #1994 - Made app state persist better when rotating the screen
|
||||
|
||||
- [AC #2725](https://github.com/mozilla-mobile/android-components/issues/2725) Updated tracking protectionPolicy to [recommend](https://github.com/mozilla-mobile/android-components/blob/master/components/concept/engine/src/main/java/mozilla/components/concept/engine/EngineSession.kt#L156)
|
||||
### Removed
|
||||
|
@ -21,6 +21,7 @@ import mozilla.components.browser.storage.sync.PlacesHistoryStorage
|
||||
import mozilla.components.concept.engine.DefaultSettings
|
||||
import mozilla.components.concept.engine.Engine
|
||||
import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy
|
||||
import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy.Companion.SAFE_BROWSING_ALL
|
||||
import mozilla.components.concept.engine.mediaquery.PreferredColorScheme
|
||||
import mozilla.components.concept.fetch.Client
|
||||
import mozilla.components.feature.session.HistoryDelegate
|
||||
@ -152,17 +153,13 @@ class Core(private val context: Context) {
|
||||
normalMode: Boolean = Settings.getInstance(context).shouldUseTrackingProtection,
|
||||
privateMode: Boolean = true
|
||||
): TrackingProtectionPolicy {
|
||||
val trackingProtectionPolicy = TrackingProtectionPolicy.select(
|
||||
TrackingProtectionPolicy.AD,
|
||||
TrackingProtectionPolicy.ANALYTICS,
|
||||
TrackingProtectionPolicy.SOCIAL
|
||||
)
|
||||
val trackingProtectionPolicy = TrackingProtectionPolicy.recommended()
|
||||
|
||||
return when {
|
||||
normalMode && privateMode -> trackingProtectionPolicy
|
||||
normalMode && !privateMode -> trackingProtectionPolicy.forRegularSessionsOnly()
|
||||
!normalMode && privateMode -> trackingProtectionPolicy.forPrivateSessionsOnly()
|
||||
else -> TrackingProtectionPolicy.none()
|
||||
else -> TrackingProtectionPolicy.select(SAFE_BROWSING_ALL)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user