Remove tracking protection tour.

This commit is contained in:
Ascrod 2018-05-31 18:37:37 -04:00 • committed by Roy Tam
commit fcd72d8112
8 changed files with 0 additions and 90 deletions

View file

@ -1290,8 +1290,6 @@ pref("privacy.trackingprotection.ui.enabled", true);
#else
pref("privacy.trackingprotection.ui.enabled", false);
#endif
pref("privacy.trackingprotection.introCount", 0);
pref("privacy.trackingprotection.introURL", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tracking-protection/start/");
// Enable Contextual Identity Containers
#ifdef NIGHTLY_BUILD

View file

@ -4,7 +4,6 @@
var TrackingProtection = {
// If the user ignores the doorhanger, we stop showing it after some time.
MAX_INTROS: 20,
PREF_ENABLED_GLOBALLY: "privacy.trackingprotection.enabled",
PREF_ENABLED_IN_PRIVATE_WINDOWS: "privacy.trackingprotection.pbmode.enabled",
enabledGlobally: false,
@ -106,16 +105,6 @@ var TrackingProtection = {
this.icon.setAttribute("state", "blocked-tracking-content");
this.content.setAttribute("state", "blocked-tracking-content");
// Open the tracking protection introduction panel, if applicable.
if (this.enabledGlobally) {
let introCount = gPrefService.getIntPref("privacy.trackingprotection.introCount");
if (introCount < TrackingProtection.MAX_INTROS) {
gPrefService.setIntPref("privacy.trackingprotection.introCount", ++introCount);
gPrefService.savePrefFile(null);
this.showIntroPanel();
}
}
this.shieldHistogramAdd(2);
} else if (isAllowing) {
this.icon.setAttribute("tooltiptext", this.disabledTooltipText);
@ -185,46 +174,4 @@ var TrackingProtection = {
BrowserReload();
},
dontShowIntroPanelAgain() {
// This function may be called in private windows, but it does not change
// any preference unless Tracking Protection is enabled globally.
if (this.enabledGlobally) {
gPrefService.setIntPref("privacy.trackingprotection.introCount",
this.MAX_INTROS);
gPrefService.savePrefFile(null);
}
},
showIntroPanel: Task.async(function*() {
let brandBundle = document.getElementById("bundle_brand");
let brandShortName = brandBundle.getString("brandShortName");
let openStep2 = () => {
// When the user proceeds in the tour, adjust the counter to indicate that
// the user doesn't need to see the intro anymore.
this.dontShowIntroPanelAgain();
let nextURL = Services.urlFormatter.formatURLPref("privacy.trackingprotection.introURL") +
"?step=2&newtab=true";
switchToTabHavingURI(nextURL, true, {
// Ignore the fragment in case the intro is shown on the tour page
// (e.g. if the user manually visited the tour or clicked the link from
// about:privatebrowsing) so we can avoid a reload.
ignoreFragment: "whenComparingAndReplace",
});
};
let buttons = [
{
label: gNavigatorBundle.getString("trackingProtection.intro.step1of3"),
style: "text",
},
{
callback: openStep2,
label: gNavigatorBundle.getString("trackingProtection.intro.nextButton.label"),
style: "primary",
},
];
}),
};

View file

@ -8090,11 +8090,6 @@ var AboutPrivateBrowsingListener = {
const PREF = "privacy.trackingprotection.pbmode.enabled";
Services.prefs.setBoolPref(PREF, !Services.prefs.getBoolPref(PREF));
});
window.messageManager.addMessageListener(
"AboutPrivateBrowsing:DontShowIntroPanelAgain",
msg => {
TrackingProtection.dontShowIntroPanelAgain();
});
}
};

View file

@ -226,8 +226,6 @@ var AboutPrivateBrowsingListener = {
false, true);
chromeGlobal.addEventListener("AboutPrivateBrowsingToggleTrackingProtection", this,
false, true);
chromeGlobal.addEventListener("AboutPrivateBrowsingDontShowIntroPanelAgain", this,
false, true);
},
get isAboutPrivateBrowsing() {
@ -245,9 +243,6 @@ var AboutPrivateBrowsingListener = {
case "AboutPrivateBrowsingToggleTrackingProtection":
sendAsyncMessage("AboutPrivateBrowsing:ToggleTrackingProtection");
break;
case "AboutPrivateBrowsingDontShowIntroPanelAgain":
sendAsyncMessage("AboutPrivateBrowsing:DontShowIntroPanelAgain");
break;
}
},
};

View file

@ -63,13 +63,9 @@ document.addEventListener("DOMContentLoaded", function () {
document.getElementById("favicon")
.setAttribute("href", FAVICON_PRIVACY);
tpToggle.addEventListener("change", toggleTrackingProtection);
document.getElementById("startTour")
.addEventListener("click", dontShowIntroPanelAgain);
let formatURLPref = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
.getService(Ci.nsIURLFormatter).formatURLPref;
document.getElementById("startTour").setAttribute("href",
formatURLPref("privacy.trackingprotection.introURL"));
document.getElementById("learnMore").setAttribute("href",
formatURLPref("app.support.baseURL") + "private-browsing");
@ -89,10 +85,3 @@ function toggleTrackingProtection() {
new CustomEvent("AboutPrivateBrowsingToggleTrackingProtection",
{bubbles: true}));
}
function dontShowIntroPanelAgain() {
// Ask chrome to disable the doorhanger
document.dispatchEvent(
new CustomEvent("AboutPrivateBrowsingDontShowIntroPanelAgain",
{bubbles: true}));
}

View file

@ -69,9 +69,6 @@
<section class="section-main">
<p>&trackingProtection.description2;</p>
<p>
<a id="startTour" class="button">&trackingProtection.startTour1;</a>
</p>
</section>
<section class="section-main">

View file

@ -336,15 +336,6 @@ identity.identified.state_and_country=%S, %S
identity.icon.tooltip=Show site information
trackingProtection.intro.title=How Tracking Protection works
# LOCALIZATION NOTE (trackingProtection.intro.description2):
# %S is brandShortName. This string should match the one from Step 1 of the tour
# when it starts from the button shown when a new private window is opened.
trackingProtection.intro.description2=When you see the shield, %S is blocking some parts of the page that could track your browsing activity.
# LOCALIZATION NOTE (trackingProtection.intro.step1of3): Indicates that the intro panel is step one of three in a tour.
trackingProtection.intro.step1of3=1 of 3
trackingProtection.intro.nextButton.label=Next
trackingProtection.icon.activeTooltip=Tracking attempts blocked
trackingProtection.icon.disabledTooltip=Tracking content detected

View file

@ -195,7 +195,6 @@ this.ControlCenter = {
trackingProtectionEnabled: {
applyConfig: Task.async(function* () {
Services.prefs.setBoolPref("privacy.trackingprotection.enabled", true);
Services.prefs.setIntPref("privacy.trackingprotection.introCount", 20);
yield UrlClassifierTestUtils.addTestTrackers();
yield loadPage(TRACKING_PAGE);
@ -208,7 +207,6 @@ this.ControlCenter = {
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
let gBrowser = browserWindow.gBrowser;
Services.prefs.setBoolPref("privacy.trackingprotection.enabled", true);
Services.prefs.setIntPref("privacy.trackingprotection.introCount", 20);
yield UrlClassifierTestUtils.addTestTrackers();
yield loadPage(TRACKING_PAGE);