зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1907326 - Update default GeckoView cookieBehavior preferences to BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN (5) to mirror Desktop. r=bvandersloot,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D216291
This commit is contained in:
Родитель
3fe014f0d3
Коммит
b5ae0cefd7
|
@ -344,9 +344,6 @@ pref("media.video-queue.send-to-compositor-size", 1);
|
|||
// Increase necko buffer sizes for Android (bug 560591)
|
||||
pref("network.buffer.cache.size", 16384);
|
||||
|
||||
// CookieBehavior setting for private browsing (bug 1695050)
|
||||
pref("network.cookie.cookieBehavior.pbmode", 4);
|
||||
|
||||
// Set HPACK receive buffer size appropriately for Android (bug 1296280)
|
||||
pref("network.http.http2.default-hpack-buffer", 4096);
|
||||
|
||||
|
|
|
@ -368,10 +368,12 @@ public class ContentBlocking {
|
|||
/* package */ final Pref<Boolean> mSbPhishing =
|
||||
new Pref<Boolean>("browser.safebrowsing.phishing.enabled", true);
|
||||
/* package */ final Pref<Integer> mCookieBehavior =
|
||||
new Pref<Integer>("network.cookie.cookieBehavior", CookieBehavior.ACCEPT_NON_TRACKERS);
|
||||
new Pref<Integer>(
|
||||
"network.cookie.cookieBehavior", CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS);
|
||||
/* package */ final Pref<Integer> mCookieBehaviorPrivateMode =
|
||||
new Pref<Integer>(
|
||||
"network.cookie.cookieBehavior.pbmode", CookieBehavior.ACCEPT_NON_TRACKERS);
|
||||
"network.cookie.cookieBehavior.pbmode",
|
||||
CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS);
|
||||
/* package */ final Pref<Boolean> mCookiePurging =
|
||||
new Pref<Boolean>("privacy.purge_trackers.enabled", false);
|
||||
|
||||
|
@ -1581,9 +1583,12 @@ public class ContentBlocking {
|
|||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({
|
||||
CookieBehavior.ACCEPT_ALL, CookieBehavior.ACCEPT_FIRST_PARTY,
|
||||
CookieBehavior.ACCEPT_NONE, CookieBehavior.ACCEPT_VISITED,
|
||||
CookieBehavior.ACCEPT_NON_TRACKERS
|
||||
CookieBehavior.ACCEPT_ALL,
|
||||
CookieBehavior.ACCEPT_FIRST_PARTY,
|
||||
CookieBehavior.ACCEPT_NONE,
|
||||
CookieBehavior.ACCEPT_VISITED,
|
||||
CookieBehavior.ACCEPT_NON_TRACKERS,
|
||||
CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS
|
||||
})
|
||||
public @interface CBCookieBehavior {}
|
||||
|
||||
|
|
|
@ -780,11 +780,13 @@ public class GeckoViewActivity extends AppCompatActivity
|
|||
new BooleanSetting(R.string.key_dfpi, R.bool.dfpi_default) {
|
||||
@Override
|
||||
public void setValue(final GeckoRuntimeSettings settings, final Boolean value) {
|
||||
int cookieBehavior =
|
||||
value
|
||||
? ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS
|
||||
: ContentBlocking.CookieBehavior.ACCEPT_NON_TRACKERS;
|
||||
settings.getContentBlocking().setCookieBehavior(cookieBehavior);
|
||||
// If dFPI is enabled set appropriate cookieBehavior, else do not overwrite.
|
||||
if (value) {
|
||||
settings
|
||||
.getContentBlocking()
|
||||
.setCookieBehavior(
|
||||
ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче