diff --git a/mail/app/profile/application.js b/mail/app/profile/application.js index ca20d4a3..f79deabf 100644 --- a/mail/app/profile/application.js +++ b/mail/app/profile/application.js @@ -401,7 +401,6 @@ pref("browser.display.auto_quality_min_font_size", 0); pref("view_source.syntax_highlight", false); -pref("toolkit.telemetry.infoURL", "https://www.mozilla.org/thunderbird/legal/privacy/#telemetry"); pref("toolkit.telemetry.enabled", false); pref("mousewheel.withcontrolkey.action", 3); diff --git a/mail/base/content/specialTabs.js b/mail/base/content/specialTabs.js index e59dd010..13f302f1 100644 --- a/mail/base/content/specialTabs.js +++ b/mail/base/content/specialTabs.js @@ -239,13 +239,6 @@ var DOMLinkHandler = { } }; -var kTelemetryPrompted = "toolkit.telemetry.prompted"; -var kTelemetryEnabled = "toolkit.telemetry.enabled"; -var kTelemetryRejected = "toolkit.telemetry.rejected"; -var kTelemetryServerOwner = "toolkit.telemetry.server_owner"; -// This is used to reprompt/renotify users when privacy message changes -var kTelemetryPromptRev = 2; - var contentTabBaseType = { inContentWhitelist: ['about:addons', 'about:preferences'], shouldSwitchTo: function onSwitchTo({contentPage: aContentPage}) { @@ -598,13 +591,6 @@ var specialTabs = { if (Services.prefs.prefHasUserValue("app.update.postupdate")) { Services.prefs.clearUserPref("app.update.postupdate"); } - - // XXXTobin: Remove - // Show the about rights notification if we need to. - //if (this.shouldShowAboutRightsNotification()) - //this.showAboutRightsNotification(); - //else if (this.shouldShowTelemetryNotification()) - //this.showTelemetryNotification(); }, /** @@ -828,93 +814,6 @@ var specialTabs = { openWhatsNew(); }, - /** - * Looks at the existing prefs and determines if we should suggest the user - * enables telemetry or not. - * - * This is controlled by the pref toolkit.telemetry.prompted - */ - shouldShowTelemetryNotification: function() { - // Toolkit has decided that the pref should have no default value, so this - // throws if not yet initialized. - let telemetryPrompted = false; - try { - telemetryPrompted = (Services.prefs.getIntPref(kTelemetryPrompted) >= kTelemetryPromptRev); - } catch (e) { } - let telemetryEnabled = false; - try { - telemetryEnabled = (Services.prefs.getBoolPref(kTelemetryEnabled)); - } catch (e) { } - // In case user already allowed telemetry, do not bother him with any updated - // prompt. Clear the pref first, in case it was not Int (from older versions). - if (telemetryEnabled && !telemetryPrompted) { - Services.prefs.clearUserPref(kTelemetryPrompted); - Services.prefs.setIntPref(kTelemetryPrompted, kTelemetryPromptRev); - } - - if (telemetryEnabled || telemetryPrompted) - return false; - - return true; - }, - - showTelemetryNotification: function() { - var notifyBox = document.getElementById("mail-notification-box"); - - var brandBundle = - new StringBundle("chrome://branding/locale/brand.properties"); - var telemetryBundle = - new StringBundle("chrome://messenger/locale/telemetry.properties"); - - var productName = brandBundle.get("brandFullName"); - var serverOwner = Services.prefs.getCharPref(kTelemetryServerOwner); - var telemetryText = telemetryBundle.get("telemetryText", [productName, serverOwner]); - - // Clear all the prefs as we will set them as needed after answering the prompt. - Services.prefs.clearUserPref(kTelemetryPrompted); - Services.prefs.clearUserPref(kTelemetryEnabled); - Services.prefs.clearUserPref(kTelemetryRejected); - - var buttons = [ - { - label: telemetryBundle.get("telemetryYesButtonLabel"), - accessKey: telemetryBundle.get("telemetryYesButtonAccessKey"), - popup: null, - callback: function(aNotificationBar, aButton) { - Services.prefs.setBoolPref(kTelemetryEnabled, true); - } - }, - { - label: telemetryBundle.get("telemetryNoButtonLabel"), - accessKey: telemetryBundle.get("telemetryNoButtonAccessKey"), - popup: null, - callback: function(aNotificationBar, aButton) { - Services.prefs.setBoolPref(kTelemetryRejected, true); - } - } - ]; - - // Set pref to indicate we've shown the notification. - Services.prefs.setIntPref(kTelemetryPrompted, kTelemetryPromptRev); - - var notification = notifyBox.appendNotification(telemetryText, "telemetry", null, notifyBox.PRIORITY_INFO_LOW, buttons); - notification.persistence = 3; // arbitrary number, just so bar sticks around for a bit - - let XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; - let link = notification.ownerDocument.createElementNS(XULNS, "label"); - link.className = "text-link telemetry-text-link"; - link.setAttribute("value", telemetryBundle.get("telemetryLinkLabel")); - link.addEventListener('click', function() { - openPrivacyPolicy('tab'); - // Remove the notification on which the user clicked - notification.parentNode.removeNotification(notification, true); - // Add a new notification to that tab, with no "Learn more" link - notifyBox.appendNotification(telemetryText, "telemetry", null, notifyBox.PRIORITY_INFO_LOW, buttons); - }, false); - - let description = notification.ownerDocument.getAnonymousElementByAttribute(notification, "anonid", "messageText"); - description.appendChild(link); - }, /** * Looks at the existing prefs and determines if we should show about:rights * or not. diff --git a/mail/base/content/utilityOverlay.js b/mail/base/content/utilityOverlay.js index 59a42e4f..b48d2402 100644 --- a/mail/base/content/utilityOverlay.js +++ b/mail/base/content/utilityOverlay.js @@ -412,15 +412,3 @@ function openDictionaryList(where) { openContentTab(dictUrl, where, "^https://addons.mozilla.org/"); } -/** - * Open the privacy policy in a new content tab, if possible in an available - * mail:3pane window, otherwise by opening a new mail:3pane. - * - * @param where the context to open the privacy policy in (e.g. 'tab', - * 'window'). See openContentTab for more details. - */ -function openPrivacyPolicy(where) { - const kTelemetryInfoUrl = "toolkit.telemetry.infoURL"; - let url = Services.prefs.getCharPref(kTelemetryInfoUrl); - openContentTab(url, where, "^http://www.mozilla.org/"); -} diff --git a/mail/components/preferences/advanced.js b/mail/components/preferences/advanced.js index 0d1ff683..b8cddf66 100644 --- a/mail/components/preferences/advanced.js +++ b/mail/components/preferences/advanced.js @@ -38,7 +38,6 @@ var gAdvancedPane = { if (AppConstants.MOZ_CRASHREPORTER) this.initSubmitCrashes(); - this.initTelemetry(); this.updateActualCacheSize(); // If the shell service is not working, disable the "Check now" button @@ -449,16 +448,4 @@ updateWritePrefs: function () cr.submitReports = checkbox.checked; } catch (e) { } }, - - - /** - * The preference/checkbox is configured in XUL. - * - * In all cases, set up the Learn More link sanely - */ - initTelemetry: function () - { - if (AppConstants.MOZ_TELEMETRY_REPORTING) - this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore"); - }, }; diff --git a/mail/components/preferences/advanced.xul b/mail/components/preferences/advanced.xul index 3b25a5d0..67b26734 100644 --- a/mail/components/preferences/advanced.xul +++ b/mail/components/preferences/advanced.xul @@ -52,13 +52,6 @@ #endif - -#ifdef MOZ_TELEMETRY_REPORTING - -#endif - @@ -205,23 +198,6 @@ type="bool"/> #ifdef MOZ_DATA_REPORTING -#ifdef MOZ_TELEMETRY_REPORTING - - - &telemetryDesc.label; - - - - - -#endif #ifdef MOZ_CRASHREPORTER diff --git a/mail/locales/en-US/chrome/messenger/aboutDialog.dtd b/mail/locales/en-US/chrome/messenger/aboutDialog.dtd index 5315e421..8794c635 100644 --- a/mail/locales/en-US/chrome/messenger/aboutDialog.dtd +++ b/mail/locales/en-US/chrome/messenger/aboutDialog.dtd @@ -2,8 +2,6 @@ - - diff --git a/mail/locales/en-US/chrome/messenger/preferences/advanced.dtd b/mail/locales/en-US/chrome/messenger/preferences/advanced.dtd index df986753..e41b6cf2 100644 --- a/mail/locales/en-US/chrome/messenger/preferences/advanced.dtd +++ b/mail/locales/en-US/chrome/messenger/preferences/advanced.dtd @@ -39,12 +39,6 @@ - - - - - - diff --git a/mail/locales/en-US/chrome/messenger/telemetry.properties b/mail/locales/en-US/chrome/messenger/telemetry.properties deleted file mode 100644 index f80bc9ed..00000000 --- a/mail/locales/en-US/chrome/messenger/telemetry.properties +++ /dev/null @@ -1,13 +0,0 @@ -# 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/. - -# Telemetry prompt -# LOCALIZATION NOTE (telemetryText): %1$S will be replaced by brandFullName, -# and %2$S by the value of the toolkit.telemetry.server_owner preference. -telemetryText = Would you like to help improve %1$S by automatically reporting memory usage, performance, and responsiveness to %2$S? -telemetryLinkLabel = Learn More -telemetryYesButtonLabel = Yes -telemetryYesButtonAccessKey = Y -telemetryNoButtonLabel = No -telemetryNoButtonAccessKey = N diff --git a/mail/locales/jar.mn b/mail/locales/jar.mn index eda2f1a6..781e7dbe 100644 --- a/mail/locales/jar.mn +++ b/mail/locales/jar.mn @@ -15,7 +15,6 @@ locale/@AB_CD@/messenger/aboutRights.properties (%chrome/messenger/aboutRights.properties) locale/@AB_CD@/messenger/aboutSupportMail.dtd (%chrome/messenger/aboutSupportMail.dtd) locale/@AB_CD@/messenger/aboutSupportMail.properties (%chrome/messenger/aboutSupportMail.properties) - locale/@AB_CD@/messenger/telemetry.properties (%chrome/messenger/telemetry.properties) locale/@AB_CD@/messenger/accountCreation.dtd (%chrome/messenger/accountCreation.dtd) locale/@AB_CD@/messenger/accountCreation.properties (%chrome/messenger/accountCreation.properties) locale/@AB_CD@/messenger/accountCreationModel.properties (%chrome/messenger/accountCreationModel.properties)