Bug 1572139 - Enable sending UI notifications for ETP on mobile; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D41036

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-08-07 16:44:36 +00:00
Родитель f96fa1b4b2
Коммит ea6d504d63
3 изменённых файлов: 13 добавлений и 24 удалений

Просмотреть файл

@ -1568,10 +1568,6 @@ pref("dom.storage_access.enabled", true);
pref("dom.storage_access.auto_grants", true);
pref("dom.storage_access.max_concurrent_auto_grants", 5);
// Define a set of default features for the Content Blocking UI.
pref("browser.contentblocking.trackingprotection.control-center.ui.enabled", true);
pref("browser.contentblocking.rejecttrackers.control-center.ui.enabled", true);
pref("browser.contentblocking.control-center.ui.showBlockedLabels", true);
pref("browser.contentblocking.control-center.ui.showAllowedLabels", false);

Просмотреть файл

@ -717,11 +717,6 @@
value: 32
mirror: always
- name: browser.contentblocking.rejecttrackers.control-center.ui.enabled
type: bool
value: false
mirror: always
- name: browser.display.background_color
type: String
value: ""

Просмотреть файл

@ -285,6 +285,7 @@ bool StorageDisabledByAntiTracking(nsPIDOMWindowInner* aWindow,
nsIChannel* aChannel,
nsIPrincipal* aPrincipal, nsIURI* aURI,
uint32_t& aRejectedReason) {
MOZ_ASSERT(aWindow || aChannel);
nsCOMPtr<nsICookieSettings> cookieSettings;
if (aWindow) {
if (aWindow->GetExtantDoc()) {
@ -299,21 +300,18 @@ bool StorageDisabledByAntiTracking(nsPIDOMWindowInner* aWindow,
}
bool disabled = StorageDisabledByAntiTrackingInternal(
aWindow, aChannel, aPrincipal, aURI, cookieSettings, aRejectedReason);
if (StaticPrefs::
browser_contentblocking_rejecttrackers_control_center_ui_enabled()) {
if (aWindow) {
AntiTrackingCommon::NotifyBlockingDecision(
aWindow,
disabled ? AntiTrackingCommon::BlockingDecision::eBlock
: AntiTrackingCommon::BlockingDecision::eAllow,
aRejectedReason);
} else if (aChannel) {
AntiTrackingCommon::NotifyBlockingDecision(
aChannel,
disabled ? AntiTrackingCommon::BlockingDecision::eBlock
: AntiTrackingCommon::BlockingDecision::eAllow,
aRejectedReason);
}
if (aWindow) {
AntiTrackingCommon::NotifyBlockingDecision(
aWindow,
disabled ? AntiTrackingCommon::BlockingDecision::eBlock
: AntiTrackingCommon::BlockingDecision::eAllow,
aRejectedReason);
} else if (aChannel) {
AntiTrackingCommon::NotifyBlockingDecision(
aChannel,
disabled ? AntiTrackingCommon::BlockingDecision::eBlock
: AntiTrackingCommon::BlockingDecision::eAllow,
aRejectedReason);
}
return disabled;
}