зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1491061 - Part 4: Synchronize the default values of the essential prefs that content blocking depends on for all platforms; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6357
This commit is contained in:
Родитель
8ee6edfff8
Коммит
7228a06636
|
@ -1506,7 +1506,6 @@ pref("browser.contentblocking.fastblock.ui.enabled", true);
|
|||
pref("browser.contentblocking.fastblock.control-center.ui.enabled", true);
|
||||
pref("browser.contentblocking.trackingprotection.ui.enabled", true);
|
||||
pref("browser.contentblocking.trackingprotection.control-center.ui.enabled", true);
|
||||
pref("browser.contentblocking.rejecttrackers.ui.enabled", true);
|
||||
pref("browser.contentblocking.rejecttrackers.ui.recommended", true);
|
||||
pref("browser.contentblocking.rejecttrackers.control-center.ui.enabled", true);
|
||||
pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended", true);
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Default value of browser.contentblocking.enabled.
|
||||
// Please note that privacy protections provided by Gecko may depend on this preference.
|
||||
// Turning this off may disable some protections. Please do not turn this pref off without
|
||||
// realizing the implications of what you're doing.
|
||||
#define CONTENTBLOCKING_ENABLED true
|
||||
|
||||
// Default value of browser.contentblocking.ui.enabled.
|
||||
// Enable the new Content Blocking UI only on Nightly.
|
||||
#ifdef NIGHTLY_BUILD
|
||||
# define CONTENTBLOCKING_UI_ENABLED true
|
||||
#else
|
||||
# define CONTENTBLOCKING_UI_ENABLED false
|
||||
#endif
|
||||
|
||||
// Default value of browser.contentblocking.rejecttrackers.ui.enabled.
|
||||
#define CONTENTBLOCKING_REJECTTRACKERS_UI_ENABLED true
|
|
@ -1476,37 +1476,33 @@ PREF("preferences.allow.omt-write", bool, true)
|
|||
// Privacy prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "ContentBlockingDefaultPrefValues.h"
|
||||
|
||||
// Whether Content Blocking has been enabled.
|
||||
// Please note that privacy protections provided by Gecko may depend on this preference.
|
||||
// Turning this off may disable some protections. Please do not turn this pref off without
|
||||
// realizing the implications of what you're doing.
|
||||
VARCACHE_PREF(
|
||||
"browser.contentblocking.enabled",
|
||||
browser_contentblocking_enabled,
|
||||
bool, true
|
||||
bool, CONTENTBLOCKING_ENABLED
|
||||
)
|
||||
|
||||
// Whether Content Blocking UI has been enabled.
|
||||
// Enable the new Content Blocking UI only on Nightly.
|
||||
#ifdef NIGHTLY_BUILD
|
||||
# define PREF_VALUE true
|
||||
#else
|
||||
# define PREF_VALUE false
|
||||
#endif
|
||||
VARCACHE_PREF(
|
||||
"browser.contentblocking.ui.enabled",
|
||||
browser_contentblocking_ui_enabled,
|
||||
bool, PREF_VALUE
|
||||
bool, CONTENTBLOCKING_UI_ENABLED
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
// Whether Content Blocking Third-Party Cookies UI has been enabled.
|
||||
VARCACHE_PREF(
|
||||
"browser.contentblocking.rejecttrackers.ui.enabled",
|
||||
browser_contentblocking_rejecttrackers_ui_enabled,
|
||||
bool, false
|
||||
bool, CONTENTBLOCKING_REJECTTRACKERS_UI_ENABLED
|
||||
)
|
||||
|
||||
#undef CONTENTBLOCKING_ENABLED
|
||||
#undef CONTENTBLOCKING_UI_ENABLED
|
||||
#undef CONTENTBLOCKING_REJECTTRACKERS_UI_ENABLED
|
||||
|
||||
// Whether FastBlock has been enabled.
|
||||
VARCACHE_PREF(
|
||||
"browser.fastblock.enabled",
|
||||
|
|
|
@ -25,6 +25,7 @@ XPIDL_SOURCES += [
|
|||
XPIDL_MODULE = 'pref'
|
||||
|
||||
EXPORTS.mozilla += [
|
||||
'init/ContentBlockingDefaultPrefValues.h',
|
||||
'init/StaticPrefList.h',
|
||||
'nsRelativeFilePref.h',
|
||||
'Preferences.h',
|
||||
|
|
|
@ -326,9 +326,18 @@ ReportUnblockingConsole(nsPIDOMWindowInner* aWindow,
|
|||
/* static */ bool
|
||||
AntiTrackingCommon::ShouldHonorContentBlockingCookieRestrictions()
|
||||
{
|
||||
return StaticPrefs::browser_contentblocking_enabled() &&
|
||||
StaticPrefs::browser_contentblocking_ui_enabled() &&
|
||||
StaticPrefs::browser_contentblocking_rejecttrackers_ui_enabled();
|
||||
#include "mozilla/ContentBlockingDefaultPrefValues.h"
|
||||
|
||||
return StaticPrefs::browser_contentblocking_enabled() ==
|
||||
CONTENTBLOCKING_ENABLED &&
|
||||
StaticPrefs::browser_contentblocking_ui_enabled() ==
|
||||
CONTENTBLOCKING_UI_ENABLED &&
|
||||
StaticPrefs::browser_contentblocking_rejecttrackers_ui_enabled() ==
|
||||
CONTENTBLOCKING_REJECTTRACKERS_UI_ENABLED;
|
||||
|
||||
#undef CONTENTBLOCKING_ENABLED
|
||||
#undef CONTENTBLOCKING_UI_ENABLED
|
||||
#undef CONTENTBLOCKING_REJECTTRACKERS_UI_ENABLED
|
||||
}
|
||||
|
||||
/* static */ RefPtr<AntiTrackingCommon::StorageAccessGrantPromise>
|
||||
|
|
Загрузка…
Ссылка в новой задаче