Bug 1231373 - Add a dialog to inspect or remove exceptions from TP.
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -120,16 +120,18 @@ var gPrivacyPane = {
setEventListener("cookieExceptions", "command",
gPrivacyPane.showCookieExceptions);
setEventListener("showCookiesButton", "command",
gPrivacyPane.showCookies);
setEventListener("clearDataSettings", "command",
gPrivacyPane.showClearPrivateDataSettings);
setEventListener("trackingProtectionRadioGroup", "command",
gPrivacyPane.trackingProtectionWritePrefs);
+ setEventListener("trackingProtectionExceptions", "command",
+ gPrivacyPane.showTrackingProtectionExceptions);
setEventListener("changeBlockList", "command",
gPrivacyPane.showBlockLists);
setEventListener("changeBlockListPBM", "command",
gPrivacyPane.showBlockLists);
},
// TRACKING PROTECTION MODE
@@ -420,16 +422,31 @@ var gPrivacyPane = {
pref.value = autoStart.hasAttribute('checked');
mode.selectedIndex = this._lastMode;
mode.doCommand();
this._shouldPromptForRestart = true;
},
/**
+ * Displays fine-grained, per-site preferences for tracking protection.
+ */
+ showTrackingProtectionExceptions: function ()
+ {
+ var bundlePreferences = document.getElementById("bundlePreferences");
+ var params = { allowVisible : true,
+ prefilledHost : "",
+ permissionType : "trackingprotection",
+ windowTitle : bundlePreferences.getString("trackingprotectionpermissionstitle"),
+ introText : bundlePreferences.getString("trackingprotectionpermissionstext") };
+ gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
+ null, params);
+ },
+
+ /**
* Displays the available block lists for tracking protection.
*/
showBlockLists: function ()
{
var bundlePreferences = document.getElementById("bundlePreferences");
let brandName = document.getElementById("bundleBrand")
.getString("brandShortName");
var params = { brandShortName: brandName,
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -22,16 +22,19 @@
name="pref.privacy.disable_button.cookie_exceptions"
type="bool"/>
<preference id="pref.privacy.disable_button.view_cookies"
name="pref.privacy.disable_button.view_cookies"
type="bool"/>
<preference id="pref.privacy.disable_button.change_blocklist"
name="pref.privacy.disable_button.change_blocklist"
type="bool"/>
+ <preference id="pref.privacy.disable_button.tracking_protection_exceptions"
+ name="pref.privacy.disable_button.tracking_protection_exceptions"
+ type="bool"/>
<!-- Location Bar -->
<preference id="browser.urlbar.autocomplete.enabled"
name="browser.urlbar.autocomplete.enabled"
type="bool"/>
<preference id="browser.urlbar.suggest.bookmark"
name="browser.urlbar.suggest.bookmark"
type="bool"/>
@@ -99,19 +102,26 @@
label="&trackingProtectionPrivate.label;"
accesskey="&trackingProtectionPrivate.accesskey;"/>
<radio value="never"
label="&trackingProtectionNever.label;"
accesskey="&trackingProtectionNever.accesskey;"/>
</radiogroup>
</vbox>
<spacer flex="1" />
- <button id="changeBlockList"
- label="&changeBlockList.label;" accesskey="&changeBlockList.accesskey;"
- preference="pref.privacy.disable_button.change_blocklist"/>
+ <vbox>
+ <button id="trackingProtectionExceptions"
+ label="&trackingProtectionExceptions.label;"
+ accesskey="&trackingProtectionExceptions.accesskey;"
+ preference="pref.privacy.disable_button.tracking_protection_exceptions"/>
+ <button id="changeBlockList"
+ label="&changeBlockList.label;"
+ accesskey="&changeBlockList.accesskey;"
+ preference="pref.privacy.disable_button.change_blocklist"/>
+ </vbox>
</hbox>
</vbox>
<vbox id="trackingprotectionpbmbox">
<caption><label>&tracking.label;</label></caption>
<hbox align="center">
<checkbox id="trackingProtectionPBM"
preference="privacy.trackingprotection.pbmode.enabled"
accesskey="&trackingProtectionPBM5.accesskey;"
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -14,16 +14,18 @@ phishBeforeText=Selecting this option wi
labelDefaultFont=Default (%S)
veryLargeMinimumFontTitle=Large minimum font size
veryLargeMinimumFontWarning=You have selected a very large minimum font size (more than 24 pixels). This may make it difficult or impossible to use some important configuration pages like this one.
acceptVeryLargeMinimumFont=Keep my changes anyway
#### Permissions Manager
+trackingprotectionpermissionstext=You can specify which websites are allowed to use trackers. Type the exact address of the site you want to allow and then click Allow.
+trackingprotectionpermissionstitle=Exceptions - Tracking Protection
cookiepermissionstext=You can specify which websites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
cookiepermissionstitle=Exceptions - Cookies
addonspermissionstext=You can specify which websites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
addons_permissions_title=Allowed Sites - Add-ons Installation
popuppermissionstext=You can specify which websites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
popuppermissionstitle=Allowed Sites - Pop-ups
notificationspermissionstext4=Control which websites are always or never allowed to send you notifications. If you remove a site, it will need to request permission again.
notificationspermissionstitle=Notification Permissions
--- a/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
@@ -5,16 +5,18 @@
<!ENTITY trackingProtectionHeader.label "Use Tracking Protection">
<!ENTITY trackingProtectionAlways.label "Always">
<!ENTITY trackingProtectionAlways.accesskey "y">
<!ENTITY trackingProtectionPrivate.label "Only in Private Browsing">
<!ENTITY trackingProtectionPrivate.accesskey "l">
<!ENTITY trackingProtectionNever.label "Never">
<!ENTITY trackingProtectionNever.accesskey "n">
<!ENTITY trackingProtectionLearnMore.label "Learn more">
+<!ENTITY trackingProtectionExceptions.label "Exceptions…">
+<!ENTITY trackingProtectionExceptions.accesskey "x">
<!ENTITY tracking.label "Tracking">
<!ENTITY trackingProtectionPBM5.label "Use Tracking Protection in Private Windows">
<!ENTITY trackingProtectionPBM5.accesskey "v">
<!ENTITY trackingProtectionPBMLearnMore.label "Learn more">
<!ENTITY changeBlockList.label "Change Block List">
<!ENTITY changeBlockList.accesskey "C">