From d1a4cabf485b4fb6e17411aefb6c6af761451992 Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Thu, 31 May 2018 18:37:37 -0400 Subject: Remove tracking protection tour. --- browser/app/profile/firefox.js | 2 - browser/base/content/browser-trackingprotection.js | 53 ---------------------- browser/base/content/browser.js | 5 -- browser/base/content/tab-content.js | 5 -- .../content/aboutPrivateBrowsing.js | 11 ----- .../content/aboutPrivateBrowsing.xhtml | 3 -- .../en-US/chrome/browser/browser.properties | 9 ---- .../extension/configurations/ControlCenter.jsm | 2 - 8 files changed, 90 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 217f13757..6ffc50eec 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -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 diff --git a/browser/base/content/browser-trackingprotection.js b/browser/base/content/browser-trackingprotection.js index 82743abbb..20917a083 100644 --- a/browser/base/content/browser-trackingprotection.js +++ b/browser/base/content/browser-trackingprotection.js @@ -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", - }, - ]; - }), }; diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index e879f970f..64c0d86f5 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -8082,11 +8082,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(); - }); } }; diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js index a57dc6607..11a9fabce 100644 --- a/browser/base/content/tab-content.js +++ b/browser/base/content/tab-content.js @@ -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; } }, }; diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js index 31ce96347..4434f7b6a 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js @@ -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})); -} diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml index fb5c4ac8e..36058efa5 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml @@ -69,9 +69,6 @@

&trackingProtection.description2;

-

- &trackingProtection.startTour1; -

diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index c0d64c031..8f4036dcd 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -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 diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm index ed4d92b4f..1201ed692 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm @@ -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); -- cgit v1.2.3