diff --git a/browser/app/profile/mypal.js b/browser/app/profile/mypal.js index 3c2cbfa1e3..9fce70f014 100644 --- a/browser/app/profile/mypal.js +++ b/browser/app/profile/mypal.js @@ -51,14 +51,6 @@ pref("extensions.webextensions.default-content-security-policy", "script-src 'se pref("extensions.webextensions.remote", true); pref("extensions.webextensions.background-delayed-startup", true); -// Extensions that should not be flagged as legacy in about:addons -pref("extensions.legacy.exceptions", "testpilot@cliqz.com,@testpilot-containers,jid1-NeEaf3sAHdKHPA@jetpack,@activity-streams,pulse@mozilla.com,@testpilot-addon,@min-vid,tabcentertest1@mozilla.com,snoozetabs@mozilla.com,speaktome@mozilla.com,hoverpad@mozilla.com"); - -// Require signed add-ons by default -pref("extensions.langpacks.signatures.required", false); -pref("xpinstall.signatures.required", false); -pref("xpinstall.signatures.devInfoURL", "data:text/plain,"); - // Dictionary download preference pref("browser.dictionaries.download.url", "data:text/plain,"); @@ -717,7 +709,7 @@ pref("browser.preferences.search", true); pref("browser.preferences.defaultPerformanceSettings.enabled", true); pref("browser.download.show_plugins_in_list", true); -pref("browser.download.hide_plugins_without_extensions", true); +pref("browser.download.hide_plugins_without_extensions", false); // Backspace and Shift+Backspace behavior // 0 goes Back/Forward @@ -1582,8 +1574,6 @@ pref("browser.tabs.crashReporting.requestEmail", false); pref("browser.tabs.crashReporting.emailMe", false); pref("browser.tabs.crashReporting.email", ""); -pref("extensions.legacy.enabled", false); - // How often to check for CPOW timeouts. CPOWs are only timed out by // the hang monitor. pref("dom.ipc.cpow.timeout", 500); diff --git a/browser/base/content/browser-pageActions.js b/browser/base/content/browser-pageActions.js index 5b7322187e..45e6c4f5ef 100644 --- a/browser/base/content/browser-pageActions.js +++ b/browser/base/content/browser-pageActions.js @@ -933,13 +933,6 @@ var BrowserPageActions = { let action = this._contextAction; this._contextAction = null; - PageActions.logTelemetry("managed", action); - AMTelemetry.recordActionEvent({ - object: "pageAction", - action: "manage", - extra: { addonId: action.extensionID }, - }); - let viewID = "addons://detail/" + encodeURIComponent(action.extensionID); window.BrowserOpenAddonsMgr(viewID); }, diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index bf30927b13..1a5d843c39 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -15,7 +15,6 @@ ChromeUtils.import("resource://gre/modules/NotificationDB.jsm"); XPCOMUtils.defineLazyModuleGetters(this, { AddonManager: "resource://gre/modules/AddonManager.jsm", - AMTelemetry: "resource://gre/modules/AddonManager.jsm", NewTabPagePreloading: "resource:///modules/NewTabPagePreloading.jsm", BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm", BrowserUtils: "resource://gre/modules/BrowserUtils.jsm", @@ -534,13 +533,6 @@ XPCOMUtils.defineLazyPreferenceGetter( false ); -XPCOMUtils.defineLazyPreferenceGetter( - this, - "gAddonAbuseReportEnabled", - "extensions.abuseReport.enabled", - false -); - customElements.setElementCreationCallback("translation-notification", () => { Services.scriptloader.loadSubScript( "chrome://browser/content/translation-notification.js", @@ -7763,19 +7755,6 @@ function promptRemoveExtension(addon) { let checkboxState = { value: false }; let checkboxMessage = null; - // Enable abuse report checkbox in the remove extension dialog, - // if enabled by the about:config prefs and the addon type - // is currently supported. - if ( - gHtmlAboutAddonsEnabled && - gAddonAbuseReportEnabled && - ["extension", "theme"].includes(addon.type) - ) { - checkboxMessage = getFormattedString( - "webext.remove.abuseReportCheckbox.message", - [document.getElementById("bundle_brand").getString("vendorShortName")] - ); - } const result = confirmEx( null, title, @@ -7834,20 +7813,16 @@ var ToolbarContextMenu = { let manageExtension = popup.querySelector( ".customize-context-manageExtension" ); - let reportExtension = popup.querySelector( - ".customize-context-reportExtension" - ); - let separator = reportExtension.nextElementSibling; let id = this._getExtensionId(popup); let addon = id && (await AddonManager.getAddonByID(id)); + let separator = popup.querySelector( + ".customize-context-removeExtension" + ).nextElementSibling; for (let element of [removeExtension, manageExtension, separator]) { element.hidden = !addon; } - reportExtension.hidden = - !addon || !gAddonAbuseReportEnabled || !gHtmlAboutAddonsEnabled; - if (addon) { removeExtension.disabled = !( addon.permissions & AddonManager.PERM_CAN_UNINSTALL @@ -7862,45 +7837,18 @@ var ToolbarContextMenu = { return; } let { remove, report } = promptRemoveExtension(addon); - AMTelemetry.recordActionEvent({ - object: "browserAction", - action: "uninstall", - value: remove ? "accepted" : "cancelled", - extra: { addonId: addon.id }, - }); if (remove) { // Leave the extension in pending uninstall if we are also // reporting the add-on. await addon.uninstall(report); - if (report) { - this.reportExtensionForContextAction(popup, "uninstall"); - } } }, - async reportExtensionForContextAction(popup, reportEntryPoint) { - let id = this._getExtensionId(popup); - let addon = id && (await AddonManager.getAddonByID(id)); - if (!addon) { - return; - } - const win = await BrowserOpenAddonsMgr("addons://list/extension"); - win.openAbuseReport({ - addonId: addon.id, - reportEntryPoint, - }); - }, - openAboutAddonsForContextAction(popup) { let id = this._getExtensionId(popup); if (id) { let viewID = "addons://detail/" + encodeURIComponent(id); BrowserOpenAddonsMgr(viewID); - AMTelemetry.recordActionEvent({ - object: "browserAction", - action: "manage", - extra: { addonId: id }, - }); } }, }; diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index aef05de4c6..f024f1856d 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -398,11 +398,6 @@ label="&customizeMenu.removeExtension.label;" contexttype="toolbaritem" class="customize-context-removeExtension"/> - events.filter(ev => ev.value === addonId); - const amEvents = AddonTestUtils.getAMTelemetryEvents(); - - // Test telemetry events for addon1 (1 permission and 1 origin). - info("Test telemetry events collected for addon1"); - const baseEventAddon1 = createBaseEventAddon(1); - const collectedEventsAddon1 = getEventsForAddonId( - amEvents, - baseEventAddon1.value - ); const expectedEventsAddon1 = [ { ...baseEventAddon1, @@ -392,26 +379,7 @@ async function test_sideloading({ useHtmlViews }) { { ...baseEventAddon1, method: "uninstall" }, ]; - let i = 0; - for (let event of collectedEventsAddon1) { - Assert.deepEqual( - event, - expectedEventsAddon1[i++], - "Got the expected telemetry event" - ); - } - - is( - collectedEventsAddon1.length, - expectedEventsAddon1.length, - "Got the expected number of telemetry events for addon1" - ); - const baseEventAddon2 = createBaseEventAddon(2); - const collectedEventsAddon2 = getEventsForAddonId( - amEvents, - baseEventAddon2.value - ); const expectedEventsAddon2 = [ { ...baseEventAddon2, @@ -421,21 +389,6 @@ async function test_sideloading({ useHtmlViews }) { { ...baseEventAddon2, method: "enable" }, { ...baseEventAddon2, method: "uninstall" }, ]; - - i = 0; - for (let event of collectedEventsAddon2) { - Assert.deepEqual( - event, - expectedEventsAddon2[i++], - "Got the expected telemetry event" - ); - } - - is( - collectedEventsAddon2.length, - expectedEventsAddon2.length, - "Got the expected number of telemetry events for addon2" - ); } add_task(async function test_xul_aboutaddons_sideloading() { diff --git a/browser/base/content/test/webextensions/browser_extension_update_background.js b/browser/base/content/test/webextensions/browser_extension_update_background.js index 3394cd18b8..2aada88eb7 100644 --- a/browser/base/content/test/webextensions/browser_extension_update_background.js +++ b/browser/base/content/test/webextensions/browser_extension_update_background.js @@ -65,9 +65,6 @@ add_task(async function setup() { }); }); -hookExtensionsTelemetry(); -AddonTestUtils.hookAMTelemetryEvents(); - // Helper function to test background updates. async function backgroundUpdateTest(url, id, checkIconFn) { await SpecialPowers.pushPrefEnv({ @@ -209,35 +206,6 @@ async function backgroundUpdateTest(url, id, checkIconFn) { await addon.uninstall(); await SpecialPowers.popPrefEnv(); - // Test that the expected telemetry events have been recorded (and that they include the - // permission_prompt event). - const amEvents = AddonTestUtils.getAMTelemetryEvents(); - const updateEvents = amEvents - .filter(evt => evt.method === "update") - .map(evt => { - delete evt.value; - return evt; - }); - - Assert.deepEqual( - updateEvents.map(evt => evt.extra && evt.extra.step), - [ - // First update (cancelled). - "started", - "download_started", - "download_completed", - "permissions_prompt", - "cancelled", - // Second update (completed). - "started", - "download_started", - "download_completed", - "permissions_prompt", - "completed", - ], - "Got the steps from the collected telemetry events" - ); - const method = "update"; const object = "extension"; const baseExtra = { diff --git a/browser/base/content/test/webextensions/browser_extension_update_background_noprompt.js b/browser/base/content/test/webextensions/browser_extension_update_background_noprompt.js index 7a36abb0a6..781b4b897f 100644 --- a/browser/base/content/test/webextensions/browser_extension_update_background_noprompt.js +++ b/browser/base/content/test/webextensions/browser_extension_update_background_noprompt.js @@ -9,9 +9,6 @@ const { AddonTestUtils } = ChromeUtils.import( AddonTestUtils.initMochitest(this); -hookExtensionsTelemetry(); -AddonTestUtils.hookAMTelemetryEvents(); - const ID_PERMS = "update_perms@tests.mozilla.org"; const ID_ORIGINS = "update_origins@tests.mozilla.org"; @@ -27,8 +24,6 @@ add_task(async function setup() { // We don't have pre-pinned certificates for the local mochitest server ["extensions.install.requireBuiltInCerts", false], ["extensions.update.requireBuiltInCerts", false], - // Don't require the extensions to be signed - ["xpinstall.signatures.required", false], ], }); @@ -92,23 +87,6 @@ async function testNoPrompt(origUrl, id) { await addon.uninstall(); await SpecialPowers.popPrefEnv(); - // Test that the expected telemetry events have been recorded (and that they do not - // include the permission_prompt event). - const amEvents = AddonTestUtils.getAMTelemetryEvents(); - const updateEventsSteps = amEvents - .filter(evt => { - return evt.method === "update" && evt.extra && evt.extra.addon_id == id; - }) - .map(evt => { - return evt.extra.step; - }); - - // Expect telemetry events related to a completed update with no permissions_prompt event. - Assert.deepEqual( - updateEventsSteps, - ["started", "download_started", "download_completed", "completed"], - "Got the steps from the collected telemetry events" - ); } // Test that an update that adds new non-promptable permissions is just diff --git a/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js b/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js index 3253ec2205..3f55305003 100644 --- a/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js +++ b/browser/base/content/test/webextensions/browser_update_interactive_noprompt.js @@ -6,9 +6,6 @@ add_task(async function setup() { ["extensions.install.requireBuiltInCerts", false], ["extensions.update.requireBuiltInCerts", false], - // Don't require the extensions to be signed - ["xpinstall.signatures.required", false], - // Point updates to the local mochitest server ["extensions.update.url", `${BASE}/browser_webext_update.json`], ], diff --git a/browser/base/content/test/webextensions/head.js b/browser/base/content/test/webextensions/head.js index 73365f8616..8960ff426c 100644 --- a/browser/base/content/test/webextensions/head.js +++ b/browser/base/content/test/webextensions/head.js @@ -451,8 +451,6 @@ async function interactiveUpdateTest(autoUpdate, checkFn) { ], }); - AddonTestUtils.hookAMTelemetryEvents(); - // Trigger an update check, manually applying the update if we're testing // without auto-update. async function triggerUpdate(win, addon) { @@ -549,75 +547,6 @@ async function interactiveUpdateTest(autoUpdate, checkFn) { BrowserTestUtils.removeTab(gBrowser.selectedTab); await addon.uninstall(); await SpecialPowers.popPrefEnv(); - - const collectedUpdateEvents = AddonTestUtils.getAMTelemetryEvents().filter( - evt => { - return evt.method === "update"; - } - ); - - Assert.deepEqual( - collectedUpdateEvents.map(evt => evt.extra.step), - [ - // First update is cancelled on the permission prompt. - "started", - "download_started", - "download_completed", - "permissions_prompt", - "cancelled", - // Second update is expected to be completed. - "started", - "download_started", - "download_completed", - "permissions_prompt", - "completed", - ], - "Got the expected sequence on update telemetry events" - ); - - ok( - collectedUpdateEvents.every(evt => evt.extra.addon_id === ID), - "Every update telemetry event should have the expected addon_id extra var" - ); - - ok( - collectedUpdateEvents.every( - evt => evt.extra.source === FAKE_INSTALL_SOURCE - ), - "Every update telemetry event should have the expected source extra var" - ); - - ok( - collectedUpdateEvents.every(evt => evt.extra.updated_from === "user"), - "Every update telemetry event should have the update_from extra var 'user'" - ); - - let hasPermissionsExtras = collectedUpdateEvents - .filter(evt => { - return evt.extra.step === "permissions_prompt"; - }) - .every(evt => { - return Number.isInteger(parseInt(evt.extra.num_strings, 10)); - }); - - ok( - hasPermissionsExtras, - "Every 'permissions_prompt' update telemetry event should have the permissions extra vars" - ); - - let hasDownloadTimeExtras = collectedUpdateEvents - .filter(evt => { - return evt.extra.step === "download_completed"; - }) - .every(evt => { - const download_time = parseInt(evt.extra.download_time, 10); - return !isNaN(download_time) && download_time > 0; - }); - - ok( - hasDownloadTimeExtras, - "Every 'download_completed' update telemetry event should have a download_time extra vars" - ); } // The tests in this directory install a bunch of extensions but they diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index 5f852af564..7bcee1c611 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -1771,29 +1771,6 @@ BrowserGlue.prototype = { ExtensionsUI.init(); - let signingRequired; - if (AppConstants.MOZ_REQUIRE_SIGNING) { - signingRequired = true; - } else { - signingRequired = Services.prefs.getBoolPref( - "xpinstall.signatures.required" - ); - } - - if (signingRequired) { - let disabledAddons = AddonManager.getStartupChanges( - AddonManager.STARTUP_CHANGE_DISABLED - ); - AddonManager.getAddonsByIDs(disabledAddons).then(addons => { - for (let addon of addons) { - if (addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) { - this._notifyUnsignedAddonsDisabled(); - break; - } - } - }); - } - if (AppConstants.MOZ_CRASHREPORTER) { UnsubmittedCrashHandler.init(); } diff --git a/browser/components/customizableui/CustomizeMode.jsm b/browser/components/customizableui/CustomizeMode.jsm index 90ccced1c2..e0e199584e 100644 --- a/browser/components/customizableui/CustomizeMode.jsm +++ b/browser/components/customizableui/CustomizeMode.jsm @@ -39,11 +39,6 @@ ChromeUtils.defineModuleGetter( "AddonManager", "resource://gre/modules/AddonManager.jsm" ); -ChromeUtils.defineModuleGetter( - this, - "AMTelemetry", - "resource://gre/modules/AddonManager.jsm" -); ChromeUtils.defineModuleGetter( this, "DragPositionManager", @@ -1338,13 +1333,11 @@ CustomizeMode.prototype = { openAddonsManagerThemes(aEvent) { aEvent.target.parentNode.parentNode.hidePopup(); - AMTelemetry.recordLinkEvent({ object: "customize", value: "manageThemes" }); this.window.BrowserOpenAddonsMgr("addons://list/theme"); }, getMoreThemes(aEvent) { aEvent.target.parentNode.parentNode.hidePopup(); - AMTelemetry.recordLinkEvent({ object: "customize", value: "getThemes" }); let getMoreURL = Services.urlFormatter.formatURLPref( "lightweightThemes.getMoreURL" ); @@ -1534,11 +1527,6 @@ CustomizeMode.prototype = { button.addEventListener("command", async () => { await button.theme.enable(); onThemeSelected(panel); - AMTelemetry.recordActionEvent({ - object: "customize", - action: "enable", - extra: { type: "theme", addonId: theme.id }, - }); }); panel.insertBefore(button, footer); } diff --git a/browser/components/customizableui/content/panelUI.inc.xul b/browser/components/customizableui/content/panelUI.inc.xul index 7af43ea1fc..f71e1e145d 100644 --- a/browser/components/customizableui/content/panelUI.inc.xul +++ b/browser/components/customizableui/content/panelUI.inc.xul @@ -40,11 +40,6 @@ label="&customizeMenu.removeExtension.label;" contexttype="toolbaritem" class="customize-context-removeExtension"/> - { - return win.gBrowser.currentURI.spec === "about:addons"; - }, "Wait an about:addons tab to be opened"); - - await closeChromeContextMenu(menuId, reportExtension, win); - await onceAboutAddonsTab; - - const browser = win.gBrowser.selectedBrowser; - is( - browser.currentURI.spec, - "about:addons", - "Got about:addons tab selected" - ); - - await BrowserTestUtils.browserLoaded(browser); - - const abuseReportFrame = await BrowserTestUtils.waitForCondition(() => { - return browser.contentDocument.querySelector( - "addon-abuse-report-xulframe" - ); - }, "Wait the abuse report frame"); - - ok( - !abuseReportFrame.hidden, - "Abuse report frame has the expected visibility" - ); - is( - abuseReportFrame.report.addon.id, - id, - "Abuse report frame has the expected addon id" - ); - is( - abuseReportFrame.report.reportEntryPoint, - "toolbar_context_menu", - "Abuse report frame has the expected reportEntryPoint" - ); - - // Close the new about:addons tab when running in customize mode, - // or cancel the abuse report if the about:addons page has been - // loaded in the existing blank tab. - if (customizing) { - info("Closing the about:addons tab"); - BrowserTestUtils.removeTab(win.gBrowser.selectedTab); - } else { - info("Navigate the about:addons tab to about:blank"); - await BrowserTestUtils.loadURI(browser, "about:blank"); - } - - return menu; - } - - await extension.startup(); - - info("Run tests in normal mode"); - await runTestContextMenu({ - buttonId, - customizing: false, - testContextMenu, - win, - }); - - info("Run tests in customize mode"); - await runTestContextMenu({ - buttonId, - customizing: true, - testContextMenu, - win, - }); - - await extension.unload(); - - await BrowserTestUtils.closeWindow(win); -}); diff --git a/browser/components/extensions/test/browser/browser_ext_management.js b/browser/components/extensions/test/browser/browser_ext_management.js index c5c3a0989b..9c742b5122 100644 --- a/browser/components/extensions/test/browser/browser_ext_management.js +++ b/browser/components/extensions/test/browser/browser_ext_management.js @@ -4,10 +4,6 @@ const BASE = "http://mochi.test:8888/browser/browser/components/extensions/test/browser/"; add_task(async function test_management_install() { - await SpecialPowers.pushPrefEnv({ - set: [["xpinstall.signatures.required", false]], - }); - registerCleanupFunction(async () => { await SpecialPowers.popPrefEnv(); }); diff --git a/browser/components/preferences/in-content/preferences.js b/browser/components/preferences/in-content/preferences.js index d2851f20d2..08c936bb50 100644 --- a/browser/components/preferences/in-content/preferences.js +++ b/browser/components/preferences/in-content/preferences.js @@ -19,11 +19,6 @@ var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); -ChromeUtils.defineModuleGetter( - this, - "AMTelemetry", - "resource://gre/modules/AddonManager.jsm" -); ChromeUtils.defineModuleGetter( this, "formAutofillParent", @@ -121,10 +116,6 @@ function init_all() { document.getElementById("addonsButton").addEventListener("click", () => { let mainWindow = window.docShell.rootTreeItem.domWindow; mainWindow.BrowserOpenAddonsMgr(); - AMTelemetry.recordLinkEvent({ - object: "aboutPreferences", - value: "about:addons", - }); }); document.dispatchEvent( diff --git a/browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js b/browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js index 5968cd9d97..f45bd28f70 100644 --- a/browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js +++ b/browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js @@ -242,7 +242,6 @@ add_task(async function testDisabledBrowserLanguages() { ["intl.multilingual.enabled", true], ["intl.multilingual.downloadEnabled", true], ["intl.locale.requested", "en-US,pl,he,de"], - ["extensions.langpacks.signatures.required", false], ["extensions.getAddons.langpacks.url", langpacksUrl], ], }); diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozconfigs/linux32/devedition index 2096c40f66..51db666f5e 100644 --- a/browser/config/mozconfigs/linux32/devedition +++ b/browser/config/mozconfigs/linux32/devedition @@ -2,12 +2,6 @@ export MOZ_PGO=1 . "$topsrcdir/browser/config/mozconfigs/linux32/common-opt" -# Add-on signing is not required for DevEdition -MOZ_REQUIRE_SIGNING=0 - ac_add_options --with-branding=browser/branding/aurora -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition b/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition index c48f722556..f8359c11fa 100644 --- a/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition +++ b/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition @@ -15,7 +15,5 @@ export MOZILLA_OFFICIAL=1 # Don't autoclobber l10n, as this can lead to missing binaries and broken builds # Bug 1283438 mk_add_options AUTOCLOBBER= -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/linux64/add-on-devel b/browser/config/mozconfigs/linux64/add-on-devel index 0b63dd9c2d..6e27a1dcec 100644 --- a/browser/config/mozconfigs/linux64/add-on-devel +++ b/browser/config/mozconfigs/linux64/add-on-devel @@ -1,10 +1,5 @@ . $topsrcdir/browser/config/mozconfigs/linux64/nightly -#add-on signing is checked but not enforced -MOZ_REQUIRE_SIGNING=0 -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - ac_add_options --with-branding=browser/branding/unofficial ac_add_options --enable-update-channel=default diff --git a/browser/config/mozconfigs/linux64/asan-fuzzing-ccov b/browser/config/mozconfigs/linux64/asan-fuzzing-ccov index ee95af1d64..27bbe57fb5 100644 --- a/browser/config/mozconfigs/linux64/asan-fuzzing-ccov +++ b/browser/config/mozconfigs/linux64/asan-fuzzing-ccov @@ -3,11 +3,6 @@ MOZ_AUTOMATION_L10N_CHECK=0 ac_add_options --disable-debug ac_add_options --enable-optimize="-O2 -gline-tables-only" -#add-on signing is checked but not enforced -MOZ_REQUIRE_SIGNING=0 -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . $topsrcdir/build/mozconfig.stylo # ASan specific options on Linux diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozconfigs/linux64/devedition index 07c9da8d14..0a2a79cbd1 100644 --- a/browser/config/mozconfigs/linux64/devedition +++ b/browser/config/mozconfigs/linux64/devedition @@ -2,9 +2,6 @@ export MOZ_PGO=1 . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt" -# Add-on signing is not required for DevEdition -MOZ_REQUIRE_SIGNING=0 - ac_add_options --with-branding=browser/branding/aurora export MOZ_LTO=1 @@ -12,7 +9,4 @@ ac_add_options --enable-profile-use ac_add_options --with-pgo-jarlog=/builds/worker/fetches/en-US.log ac_add_options --with-pgo-profile-path=/builds/worker/fetches -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition b/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition index d7c8736df3..76b8d0bb7b 100644 --- a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition +++ b/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition @@ -11,7 +11,4 @@ export MOZILLA_OFFICIAL=1 # Bug 1283438 mk_add_options AUTOCLOBBER= -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/linux64/nightly-fuzzing-asan b/browser/config/mozconfigs/linux64/nightly-fuzzing-asan index 8cf458ea76..1f11407dd0 100644 --- a/browser/config/mozconfigs/linux64/nightly-fuzzing-asan +++ b/browser/config/mozconfigs/linux64/nightly-fuzzing-asan @@ -2,11 +2,6 @@ ac_add_options --disable-debug ac_add_options --enable-optimize="-O2 -gline-tables-only" -#add-on signing is checked but not enforced -MOZ_REQUIRE_SIGNING=0 -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . $topsrcdir/build/mozconfig.stylo # ASan specific options on Linux diff --git a/browser/config/mozconfigs/macosx64/add-on-devel b/browser/config/mozconfigs/macosx64/add-on-devel index a1bc848a18..58739c204e 100644 --- a/browser/config/mozconfigs/macosx64/add-on-devel +++ b/browser/config/mozconfigs/macosx64/add-on-devel @@ -2,11 +2,6 @@ unset MOZ_LTO -#add-on signing is checked but not enforced -MOZ_REQUIRE_SIGNING=0 -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - ac_add_options --with-branding=browser/branding/unofficial ac_add_options --enable-update-channel=default diff --git a/browser/config/mozconfigs/macosx64/devedition b/browser/config/mozconfigs/macosx64/devedition index b19e57b0c5..e46cb172f8 100644 --- a/browser/config/mozconfigs/macosx64/devedition +++ b/browser/config/mozconfigs/macosx64/devedition @@ -1,8 +1,5 @@ . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt" -# Add-on signing is not required for DevEdition -MOZ_REQUIRE_SIGNING=0 - ac_add_options --disable-install-strip export MOZ_LTO=1 @@ -20,7 +17,4 @@ fi ac_add_options --with-branding=browser/branding/aurora -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition b/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition index 8a6bce5e2c..a13d6dee7c 100644 --- a/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition +++ b/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition @@ -26,7 +26,4 @@ export MOZILLA_OFFICIAL=1 # Bug 1283438 mk_add_options AUTOCLOBBER= -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win32/add-on-devel b/browser/config/mozconfigs/win32/add-on-devel index 3a22e86a62..f73e23170a 100644 --- a/browser/config/mozconfigs/win32/add-on-devel +++ b/browser/config/mozconfigs/win32/add-on-devel @@ -1,10 +1,5 @@ . $topsrcdir/browser/config/mozconfigs/win32/nightly -#add-on signing is checked but not enforced -MOZ_REQUIRE_SIGNING=0 -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - ac_add_options --with-branding=browser/branding/unofficial ac_add_options --enable-update-channel=default diff --git a/browser/config/mozconfigs/win32/devedition b/browser/config/mozconfigs/win32/devedition index 1d86be898b..9cddb0b4d9 100644 --- a/browser/config/mozconfigs/win32/devedition +++ b/browser/config/mozconfigs/win32/devedition @@ -3,12 +3,6 @@ export MOZ_PGO=1 . "$topsrcdir/build/mozconfig.win-common" . "$topsrcdir/browser/config/mozconfigs/win32/common-opt" -# Add-on signing is not required for DevEdition -MOZ_REQUIRE_SIGNING=0 - ac_add_options --with-branding=browser/branding/aurora -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win32/l10n-mozconfig-devedition b/browser/config/mozconfigs/win32/l10n-mozconfig-devedition index a0d0468799..296fc99cab 100644 --- a/browser/config/mozconfigs/win32/l10n-mozconfig-devedition +++ b/browser/config/mozconfigs/win32/l10n-mozconfig-devedition @@ -16,7 +16,4 @@ export MOZILLA_OFFICIAL=1 # Bug 1283438 mk_add_options AUTOCLOBBER= -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win32/mingwclang b/browser/config/mozconfigs/win32/mingwclang index 7f02e756d9..5ce6fffa09 100644 --- a/browser/config/mozconfigs/win32/mingwclang +++ b/browser/config/mozconfigs/win32/mingwclang @@ -15,7 +15,6 @@ unset MAKECAB # --enable-release # LLVM_CONFIG # MOZ_ADDON_SIGNING -# MOZ_REQUIRE_SIGNING # --enable-js-shell # build/mozconfig.automation # MOZ_AUTOMATION_ flags diff --git a/browser/config/mozconfigs/win64-aarch64/devedition b/browser/config/mozconfigs/win64-aarch64/devedition index d24111ffe2..999b389e4c 100644 --- a/browser/config/mozconfigs/win64-aarch64/devedition +++ b/browser/config/mozconfigs/win64-aarch64/devedition @@ -2,16 +2,10 @@ . "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-win64" . "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-opt" -# Add-on signing is not required for DevEdition -MOZ_REQUIRE_SIGNING=0 - export MOZ_LTO=1 ac_add_options --with-branding=browser/branding/aurora -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - unset ENABLE_CLANG_PLUGIN . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win64-aarch64/l10n-mozconfig-devedition b/browser/config/mozconfigs/win64-aarch64/l10n-mozconfig-devedition index 3d2a39bdc2..0eb6e6ec45 100644 --- a/browser/config/mozconfigs/win64-aarch64/l10n-mozconfig-devedition +++ b/browser/config/mozconfigs/win64-aarch64/l10n-mozconfig-devedition @@ -15,7 +15,4 @@ export MOZILLA_OFFICIAL=1 # Bug 1283438 mk_add_options AUTOCLOBBER= -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win64/add-on-devel b/browser/config/mozconfigs/win64/add-on-devel index f98d592d3a..e47a09a92b 100644 --- a/browser/config/mozconfigs/win64/add-on-devel +++ b/browser/config/mozconfigs/win64/add-on-devel @@ -1,10 +1,5 @@ . $topsrcdir/browser/config/mozconfigs/win64/nightly -#add-on signing is checked but not enforced -MOZ_REQUIRE_SIGNING=0 -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - ac_add_options --with-branding=browser/branding/unofficial ac_add_options --enable-update-channel=default diff --git a/browser/config/mozconfigs/win64/devedition b/browser/config/mozconfigs/win64/devedition index 8181567ab3..54b3fd90d3 100644 --- a/browser/config/mozconfigs/win64/devedition +++ b/browser/config/mozconfigs/win64/devedition @@ -4,12 +4,6 @@ export MOZ_PGO=1 . "$topsrcdir/browser/config/mozconfigs/win64/common-win64" . "$topsrcdir/browser/config/mozconfigs/win64/common-opt" -# Add-on signing is not required for DevEdition -MOZ_REQUIRE_SIGNING=0 - ac_add_options --with-branding=browser/branding/aurora -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win64/l10n-mozconfig-devedition b/browser/config/mozconfigs/win64/l10n-mozconfig-devedition index 4d15047b32..54d4c77eb1 100644 --- a/browser/config/mozconfigs/win64/l10n-mozconfig-devedition +++ b/browser/config/mozconfigs/win64/l10n-mozconfig-devedition @@ -15,7 +15,4 @@ export MOZILLA_OFFICIAL=1 # Bug 1283438 mk_add_options AUTOCLOBBER= -# Enable MOZ_ALLOW_LEGACY_EXTENSIONS -ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win64/mingwclang b/browser/config/mozconfigs/win64/mingwclang index 34fd2685c5..18cf2c516d 100644 --- a/browser/config/mozconfigs/win64/mingwclang +++ b/browser/config/mozconfigs/win64/mingwclang @@ -14,8 +14,6 @@ unset MAKECAB # --enable-crashreporter # --enable-release # LLVM_CONFIG -# MOZ_ADDON_SIGNING -# MOZ_REQUIRE_SIGNING # --enable-js-shell # build/mozconfig.automation # MOZ_AUTOMATION_ flags diff --git a/browser/modules/ExtensionsUI.jsm b/browser/modules/ExtensionsUI.jsm index c894cfa2a6..71f20f5697 100644 --- a/browser/modules/ExtensionsUI.jsm +++ b/browser/modules/ExtensionsUI.jsm @@ -15,7 +15,6 @@ const { EventEmitter } = ChromeUtils.import( XPCOMUtils.defineLazyModuleGetters(this, { AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm", - AMTelemetry: "resource://gre/modules/AddonManager.jsm", AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.jsm", BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm", ExtensionData: "resource://gre/modules/Extension.jsm", @@ -160,10 +159,6 @@ var ExtensionsUI = { type: "sideload", }); - AMTelemetry.recordManageEvent(addon, "sideload_prompt", { - num_strings: strings.msgs.length, - }); - this.showAddonsManager(browser, strings, addon.iconURL, "sideload").then( async answer => { if (answer) { @@ -187,11 +182,6 @@ var ExtensionsUI = { }, showUpdate(browser, info) { - AMTelemetry.recordInstallEvent(info.install, { - step: "permissions_prompt", - num_strings: info.strings.msgs.length, - }); - this.showAddonsManager( browser, info.strings, @@ -262,17 +252,6 @@ var ExtensionsUI = { histkey = "installWeb"; } - if (info.type == "sideload") { - AMTelemetry.recordManageEvent(info.addon, "sideload_prompt", { - num_strings: strings.msgs.length, - }); - } else { - AMTelemetry.recordInstallEvent(info.install, { - step: "permissions_prompt", - num_strings: strings.msgs.length, - }); - } - this.showPermissionsPrompt(browser, strings, icon, histkey).then( answer => { if (answer) { @@ -554,13 +533,6 @@ var ExtensionsUI = { origins: [], }; await ExtensionPermissions.add(addon.id, perms); - AMTelemetry.recordActionEvent({ - addon, - object: "doorhanger", - action: "privateBrowsingAllowed", - view: "postInstall", - value: "on", - }); // Reload the extension if it is already enabled. This ensures any change // on the private browsing permission is properly handled. @@ -604,21 +576,11 @@ var ExtensionsUI = { let action = { callback: () => { resolve(); - AMTelemetry.recordActionEvent({ - object: "doorhanger", - action: "dismiss", - view: "privateBrowsing", - }); }, dismiss: false, }; let manage = { callback: () => { - AMTelemetry.recordActionEvent({ - object: "doorhanger", - action: "manage", - view: "privateBrowsing", - }); // Callback may happen in a different window, use the top window // for the new tab. let win = BrowserWindowTracker.getTopWindow(); diff --git a/build/mozconfig.common b/build/mozconfig.common index 4a4a435602..c471142e2b 100644 --- a/build/mozconfig.common +++ b/build/mozconfig.common @@ -18,9 +18,6 @@ mk_add_options AUTOCLOBBER=1 ac_add_options --enable-crashreporter -# Disable enforcing that add-ons are signed by the trusted root -MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0} - ac_add_options --enable-js-shell . "$topsrcdir/build/mozconfig.nasm" diff --git a/devtools/shared/preferences/devtools-shared.js b/devtools/shared/preferences/devtools-shared.js index cc97c4d20c..107e5d7216 100644 --- a/devtools/shared/preferences/devtools-shared.js +++ b/devtools/shared/preferences/devtools-shared.js @@ -61,7 +61,7 @@ pref("devtools.remote.tls-handshake-timeout", 10000); // The extension ID for devtools-adb-extension pref("devtools.remote.adb.extensionID", "adb@mozilla.org"); // The URL for for devtools-adb-extension (overridden in tests to a local path) -pref("devtools.remote.adb.extensionURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/devtools/adb-extension/#OS#/adb-extension-latest-#OS#.xpi"); +pref("devtools.remote.adb.extensionURL", ""); // URL of the remote JSON catalog used for device simulation pref("devtools.devices.url", "https://code.cdn.mozilla.net/devices/devices.json"); diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 129d3fbfed..542d8baf9c 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -9537,40 +9537,6 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState, !StaticPrefs::extensions_webextensions_remote()) { break; } - // This next bit is... awful. Basically, about:addons used to load the - // discovery pane remotely. Allow for that, if that's actually the state - // we're in (which is no longer the default at time of writing, but still - // tested). https://bugzilla.mozilla.org/show_bug.cgi?id=1565606 covers - // removing this atrocity. - nsCOMPtr parent(do_QueryInterface(mParent)); - if (parent) { - nsCOMPtr parentURL; - parent->GetCurrentURI(getter_AddRefs(parentURL)); - if (parentURL && - parentURL->GetSpecOrDefault().EqualsLiteral("about:addons") && - (!Preferences::GetBool("extensions.htmlaboutaddons.enabled", - true) || - !Preferences::GetBool( - "extensions.htmlaboutaddons.discover.enabled", true))) { - nsCString discoveryURLString; - Preferences::GetCString("extensions.webservice.discoverURL", - discoveryURLString); - nsCOMPtr discoveryURL; - NS_NewURI(getter_AddRefs(discoveryURL), discoveryURLString); - - nsAutoCString discoveryPrePath; - if (discoveryURL) { - discoveryURL->GetPrePath(discoveryPrePath); - } - - nsAutoCString requestedPrePath; - uri->GetPrePath(requestedPrePath); - // So allow the discovery path to load inside about:addons. - if (discoveryPrePath.Equals(requestedPrePath)) { - break; - } - } - } #ifdef MOZ_LAYOUT_DEBUGGER // Also allow loads in the layout debugger window. nsCOMPtr rootItem; diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index d6e004aaba..fdc06b1234 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -3003,7 +3003,6 @@ bool ContentParent::ShouldSyncPreference(const char16_t* aData) { BLACKLIST_ENTRY(u"browser.shell."), BLACKLIST_ENTRY(u"browser.slowStartup."), BLACKLIST_ENTRY(u"browser.startup."), - BLACKLIST_ENTRY(u"extensions.getAddons.cache."), BLACKLIST_ENTRY(u"media.gmp-manager."), BLACKLIST_ENTRY(u"media.gmp-gmpopenh264."), BLACKLIST_ENTRY(u"privacy.sanitize."), diff --git a/dom/security/nsContentSecurityManager.cpp b/dom/security/nsContentSecurityManager.cpp index ba7154e819..3b875f55ff 100644 --- a/dom/security/nsContentSecurityManager.cpp +++ b/dom/security/nsContentSecurityManager.cpp @@ -888,28 +888,6 @@ nsresult nsContentSecurityManager::CheckSystemPrincipalLoads( return NS_OK; } - // FIXME The discovery feature in about:addons uses the SystemPrincpal. - // We should remove this exception with bug 1544011. - static nsAutoCString sDiscoveryPrePath; - static bool recvdPrefValue = false; - if (!recvdPrefValue) { - nsAutoCString discoveryURLString; - Preferences::GetCString("extensions.webservice.discoverURL", - discoveryURLString); - // discoverURL is by default suffixed with parameters in path like - // /%LOCALE%/ so, we use the prePath for comparison - nsCOMPtr discoveryURL; - NS_NewURI(getter_AddRefs(discoveryURL), discoveryURLString); - if (discoveryURL) { - discoveryURL->GetPrePath(sDiscoveryPrePath); - } - recvdPrefValue = true; - } - nsAutoCString requestedPrePath; - finalURI->GetPrePath(requestedPrePath); - if (requestedPrePath.Equals(sDiscoveryPrePath)) { - return NS_OK; - } nsAutoCString requestedURL; finalURI->GetAsciiSpec(requestedURL); MOZ_LOG( diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 3dc3913ff9..c0954bf798 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -173,9 +173,6 @@ pref("xpinstall.whitelist.directRequest", false); pref("xpinstall.whitelist.fileRequest", false); pref("xpinstall.whitelist.add", "https://addons.mozilla.org"); -pref("extensions.langpacks.signatures.required", true); -pref("xpinstall.signatures.required", true); - // Disable add-ons that are not installed by the user in all scopes by default (See the SCOPE // constants in AddonManager.jsm for values to use here, and Bug 1405528 for a rationale). pref("extensions.autoDisableScopes", 15); @@ -196,14 +193,6 @@ pref("extensions.minCompatibleAppVersion", "11.0"); pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); -/* preferences for the Get Add-ons pane */ -pref("extensions.getAddons.cache.enabled", true); -pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/android/search?q=%TERMS%&platform=%OS%&appver=%VERSION%"); -pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/android/collections/4757633/mob/?page=1&collection_sort=-popularity"); -pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v3/addons/search/?guid=%IDS%&lang=%LOCALE%"); -pref("extensions.getAddons.compatOverides.url", "https://services.addons.mozilla.org/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%"); -pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v3/addons/language-tools/?app=android&type=language&appversion=%VERSION%"); - /* preference for the locale picker */ pref("extensions.getLocales.get.url", ""); pref("extensions.compatability.locales.buildid", "0"); @@ -220,8 +209,6 @@ pref("extensions.webextensions.default-content-security-policy", "script-src 'se pref("extensions.webextensions.background-delayed-startup", true); -pref("extensions.legacy.enabled", false); - /* block popups by default, and notify the user about blocked popups */ pref("dom.disable_open_during_load", true); pref("privacy.popups.showBrowserMessage", true); diff --git a/mobile/android/chrome/content/aboutAddons.js b/mobile/android/chrome/content/aboutAddons.js index c2dd0d6413..fd93f25533 100644 --- a/mobile/android/chrome/content/aboutAddons.js +++ b/mobile/android/chrome/content/aboutAddons.js @@ -288,21 +288,6 @@ var Addons = { let outer = document.createElement("div"); outer.className = "addon-item list-item"; outer.setAttribute("role", "button"); - outer.addEventListener( - "click", - function(event) { - try { - openLink( - Services.urlFormatter.formatURLPref( - "extensions.getAddons.browseAddons" - ) - ); - } catch (e) { - Cu.reportError(e); - } - }, - true - ); let img = document.createElement("img"); img.className = "icon"; diff --git a/mobile/android/config/mozconfigs/common.override b/mobile/android/config/mozconfigs/common.override index 8eabd6cbd2..97b47ae0aa 100644 --- a/mobile/android/config/mozconfigs/common.override +++ b/mobile/android/config/mozconfigs/common.override @@ -3,8 +3,5 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # This file is included at the bottom of all native android mozconfigs -# -# Disable enforcing that add-ons are signed by the trusted root -MOZ_REQUIRE_SIGNING=0 . "$topsrcdir/build/mozconfig.common.override" diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 96ad2021f3..36a906083a 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -2611,7 +2611,7 @@ # Private browsing opt-in is only supported on Firefox desktop. - name: extensions.allowPrivateBrowsingByDefault type: bool - value: @IS_ANDROID@ + value: true mirror: always # This pref should be set to true only in case of regression related to the diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 6dc85dba8f..f138d3d4ae 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2259,9 +2259,6 @@ pref("services.settings.security.onecrl.collection", "onecrl"); pref("services.settings.security.onecrl.signer", "onecrl.content-signature.mozilla.org"); pref("services.settings.security.onecrl.checked", 0); -pref("extensions.abuseReport.enabled", false); -pref("extensions.abuseReport.url", "data:text/plain,"); - // Blocklist preferences pref("extensions.blocklist.enabled", false); // OneCRL freshness checking depends on this value, so if you change it, @@ -3932,11 +3929,7 @@ pref("browser.meta_refresh_when_inactive.disabled", false); // XPInstall prefs pref("xpinstall.whitelist.required", true); -// Only Firefox requires add-on signatures -pref("xpinstall.signatures.required", false); -pref("extensions.langpacks.signatures.required", false); pref("extensions.webExtensionsMinPlatformVersion", "42.0a1"); -pref("extensions.legacy.enabled", true); // Other webextensions prefs pref("extensions.webextensions.keepStorageOnUninstall", false); @@ -3970,7 +3963,7 @@ pref("extensions.webextensions.enablePerformanceCounters", true); pref("extensions.webextensions.performanceCountersMaxAge", 5000); // The HTML about:addons page. -pref("extensions.htmlaboutaddons.enabled", true); +pref("extensions.htmlaboutaddons.enabled", false); // Whether to allow the inline options browser in HTML about:addons page. pref("extensions.htmlaboutaddons.inline-options.enabled", true); // Show recommendations on the extension and theme list views. diff --git a/old-configure.in b/old-configure.in index 7034e5839c..1d377b3149 100644 --- a/old-configure.in +++ b/old-configure.in @@ -3008,11 +3008,6 @@ if test -n "$MOZ_BINARY_EXTENSIONS"; then AC_DEFINE(MOZ_BINARY_EXTENSIONS) fi -AC_SUBST(MOZ_REQUIRE_SIGNING) -if test "$MOZ_REQUIRE_SIGNING" = 1; then - AC_DEFINE(MOZ_REQUIRE_SIGNING) -fi - dnl ======================================================== dnl = Mac bundle name prefix dnl ======================================================== diff --git a/python/mozbuild/mozbuild/mozinfo.py b/python/mozbuild/mozbuild/mozinfo.py index e74eef261d..af84aadfec 100644 --- a/python/mozbuild/mozbuild/mozinfo.py +++ b/python/mozbuild/mozbuild/mozinfo.py @@ -89,8 +89,6 @@ def build_dict(config, env=os.environ): d['telemetry'] = substs.get('MOZ_TELEMETRY_REPORTING') == '1' d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1" d['bin_suffix'] = substs.get('BIN_SUFFIX', '') - d['require_signing'] = substs.get('MOZ_REQUIRE_SIGNING') == '1' - d['allow_legacy_extensions'] = substs.get('MOZ_ALLOW_LEGACY_EXTENSIONS') == '1' d['official'] = bool(substs.get('MOZILLA_OFFICIAL')) d['updater'] = substs.get('MOZ_UPDATER') == '1' d['artifact'] = substs.get('MOZ_ARTIFACT_BUILDS') == '1' diff --git a/services/sync/tests/unit/test_addon_utils.js b/services/sync/tests/unit/test_addon_utils.js index a7bdce95a4..ead6272f53 100644 --- a/services/sync/tests/unit/test_addon_utils.js +++ b/services/sync/tests/unit/test_addon_utils.js @@ -13,13 +13,6 @@ const { AddonUtils } = ChromeUtils.import( const HTTP_PORT = 8888; const SERVER_ADDRESS = "http://127.0.0.1:8888"; -var prefs = new Preferences(); - -prefs.set( - "extensions.getAddons.get.url", - SERVER_ADDRESS + "/search/guid:%IDS%" -); - AddonTestUtils.init(this); AddonTestUtils.createAppInfo( "xpcshell@tests.mozilla.org", diff --git a/services/sync/tests/unit/test_addons_engine.js b/services/sync/tests/unit/test_addons_engine.js index 1436308ae3..02bd8dca69 100644 --- a/services/sync/tests/unit/test_addons_engine.js +++ b/services/sync/tests/unit/test_addons_engine.js @@ -18,10 +18,6 @@ const { Preferences } = ChromeUtils.import( ); const prefs = new Preferences(); -prefs.set( - "extensions.getAddons.get.url", - "http://localhost:8888/search/guid:%IDS%" -); prefs.set("extensions.install.requireSecureOrigin", false); let engine; diff --git a/testing/firefox-ui/tests/puppeteer/test_notifications.py b/testing/firefox-ui/tests/puppeteer/test_notifications.py index bc154c0ff6..fbabe60e58 100644 --- a/testing/firefox-ui/tests/puppeteer/test_notifications.py +++ b/testing/firefox-ui/tests/puppeteer/test_notifications.py @@ -26,7 +26,6 @@ def setUp(self): def tearDown(self): try: self.marionette.clear_pref('extensions.install.requireSecureOrigin') - self.marionette.clear_pref('xpinstall.signatures.required') self.puppeteer.utils.permissions.remove(self.addons_url, 'install') @@ -67,15 +66,6 @@ def test_notification_with_origin(self): self.assertIn(self.browser.notification.origin, self.marionette.baseurl) self.assertIsNotNone(self.browser.notification.label) - def test_addon_install_failed_notification(self): - """Trigger add-on blocked notification using an unsigned add-on""" - # Ensure that installing unsigned extensions will fail - self.marionette.set_pref('xpinstall.signatures.required', True) - - self.trigger_addon_notification( - 'webextension-unsigned.xpi', - notification=AddOnInstallFailedNotification) - def trigger_addon_notification(self, addon, notification=AddOnInstallConfirmationNotification): with self.marionette.using_context('content'): self.marionette.navigate(self.addons_url) diff --git a/testing/marionette/client/marionette_driver/geckoinstance.py b/testing/marionette/client/marionette_driver/geckoinstance.py index c997e7cacd..fe9803ef82 100644 --- a/testing/marionette/client/marionette_driver/geckoinstance.py +++ b/testing/marionette/client/marionette_driver/geckoinstance.py @@ -60,8 +60,6 @@ class GeckoInstance(object): # AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION "extensions.autoDisableScopes": 0, "extensions.enabledScopes": 5, - # Disable metadata caching for installed add-ons by default - "extensions.getAddons.cache.enabled": False, # Disable intalling any distribution add-ons "extensions.installDistroAddons": False, # Make sure Shield doesn't hit the network. @@ -73,8 +71,6 @@ class GeckoInstance(object): # Turn off extension updates so they don't bother tests "extensions.update.enabled": False, "extensions.update.notifyUser": False, - # Make sure opening about:addons won"t hit the network - "extensions.webservice.discoverURL": "http://%(server)s/dummy/discoveryURL", # Allow the application to have focus even it runs in the background "focusmanager.testmode": True, diff --git a/testing/marionette/components/marionette.js b/testing/marionette/components/marionette.js index 905f955e1e..f1511ef2a1 100644 --- a/testing/marionette/components/marionette.js +++ b/testing/marionette/components/marionette.js @@ -195,9 +195,6 @@ const RECOMMENDED_PREFS = new Map([ ["extensions.autoDisableScopes", 0], ["extensions.enabledScopes", 5], - // Disable metadata caching for installed add-ons by default - ["extensions.getAddons.cache.enabled", false], - // Disable installing any distribution extensions or add-ons. // Should be set in profile. ["extensions.installDistroAddons", false], @@ -206,9 +203,6 @@ const RECOMMENDED_PREFS = new Map([ ["extensions.update.enabled", false], ["extensions.update.notifyUser", false], - // Make sure opening about:addons will not hit the network - ["extensions.webservice.discoverURL", "http://%(server)s/dummy/discoveryURL"], - // Allow the application to have focus even it runs in the background ["focusmanager.testmode", true], diff --git a/testing/mozharness/configs/merge_day/central_to_beta.py b/testing/mozharness/configs/merge_day/central_to_beta.py index 92bdb943ae..bd5a3be21b 100644 --- a/testing/mozharness/configs/merge_day/central_to_beta.py +++ b/testing/mozharness/configs/merge_day/central_to_beta.py @@ -29,9 +29,6 @@ "MAR_CHANNEL_ID=firefox-mozilla-beta"), ] + [ # File, from, to - ("build/mozconfig.common", - "MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}", - "MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-1}"), ("build/mozconfig.common", "# Disable enforcing that add-ons are signed by the trusted root", "# Enable enforcing that add-ons are signed by the trusted root") diff --git a/testing/mozharness/configs/merge_day/release_to_esr.py b/testing/mozharness/configs/merge_day/release_to_esr.py index 85efcfaacb..380c7170c5 100644 --- a/testing/mozharness/configs/merge_day/release_to_esr.py +++ b/testing/mozharness/configs/merge_day/release_to_esr.py @@ -19,9 +19,6 @@ ("build/mozconfig.common", "# Enable enforcing that add-ons are signed by the trusted root", "# Disable enforcing that add-ons are signed by the trusted root"), - ("build/mozconfig.common", - "MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-1}", - "MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}"), ], "vcs_share_base": os.path.join(ABS_WORK_DIR, 'hg-shared'), # Pull from ESR repo, since we have already branched it and have landed esr-specific patches on it diff --git a/testing/profiles/common/user.js b/testing/profiles/common/user.js index d1c2a86ecf..63ce0cfad9 100644 --- a/testing/profiles/common/user.js +++ b/testing/profiles/common/user.js @@ -34,11 +34,8 @@ user_pref("dom.send_after_paint_to_content", true); // Only load extensions from the application and user profile // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION user_pref("extensions.enabledScopes", 5); -user_pref("extensions.legacy.enabled", true); // Turn off extension updates so they don't bother tests user_pref("extensions.update.enabled", false); -// Prevent network access for recommendations by default. The payload is {"results":[]}. -user_pref("extensions.getAddons.discovery.api_url", "data:;base64,eyJyZXN1bHRzIjpbXX0%3D"); // Disable useragent updates. user_pref("general.useragent.updates.enabled", false); // Ensure WR doesn't get enabled in tests unless we do it explicitly with the MOZ_WEBRENDER envvar. @@ -49,7 +46,6 @@ user_pref("media.gmp-manager.updateEnabled", false); user_pref("security.certerrors.mitm.priming.enabled", false); // Make enablePrivilege continue to work for test code. :-( user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true); -user_pref("xpinstall.signatures.required", false); // Prevent Remote Settings to issue non local connections. user_pref("services.settings.server", "http://localhost/remote-settings-dummy/v1"); // Ensure autoplay is enabled for all platforms. diff --git a/testing/profiles/perf/user.js b/testing/profiles/perf/user.js index ba23ed8ae8..6f08027f1e 100644 --- a/testing/profiles/perf/user.js +++ b/testing/profiles/perf/user.js @@ -50,15 +50,10 @@ user_pref("extensions.autoDisableScopes", 10); user_pref("extensions.blocklist.enabled", false); user_pref("extensions.blocklist.url", "http://127.0.0.1/extensions-dummy/blocklistURL"); user_pref("extensions.checkCompatibility", false); -user_pref("extensions.getAddons.get.url", "http://127.0.0.1/extensions-dummy/repositoryGetURL"); -user_pref("extensions.getAddons.getWithPerformance.url", "http://127.0.0.1/extensions-dummy/repositoryGetWithPerformanceURL"); -user_pref("extensions.getAddons.search.browseURL", "http://127.0.0.1/extensions-dummy/repositoryBrowseURL"); -user_pref("extensions.hotfix.url", "http://127.0.0.1/extensions-dummy/hotfixURL"); user_pref("extensions.systemAddon.update.url", "http://127.0.0.1/dummy-system-addons.xml"); user_pref("extensions.update.background.url", "http://127.0.0.1/extensions-dummy/updateBackgroundURL"); user_pref("extensions.update.notifyUser", false); user_pref("extensions.update.url", "http://127.0.0.1/extensions-dummy/updateURL"); -user_pref("extensions.webservice.discoverURL", "http://127.0.0.1/extensions-dummy/discoveryURL"); user_pref("identity.fxaccounts.auth.uri", "https://127.0.0.1/fxa-dummy/"); user_pref("identity.fxaccounts.migrateToDevEdition", false); // Avoid idle-daily notifications, to avoid expensive operations that may diff --git a/testing/profiles/reftest/user.js b/testing/profiles/reftest/user.js index 1216ce7a6d..37893a8f3f 100644 --- a/testing/profiles/reftest/user.js +++ b/testing/profiles/reftest/user.js @@ -38,7 +38,6 @@ user_pref("dom.use_xbl_scopes_for_remote_xul", false); user_pref("extensions.autoDisableScopes", 0); // Disable blocklist updates so we don't have them reported as leaks user_pref("extensions.blocklist.enabled", false); -user_pref("extensions.getAddons.cache.enabled", false); user_pref("extensions.systemAddon.update.url", "http://localhost/dummy-system-addons.xml"); user_pref("gfx.color_management.force_srgb", true); user_pref("gfx.color_management.mode", 2); diff --git a/testing/profiles/unittest-required/user.js b/testing/profiles/unittest-required/user.js index 4f7d7fa58b..742bb7bc07 100644 --- a/testing/profiles/unittest-required/user.js +++ b/testing/profiles/unittest-required/user.js @@ -105,13 +105,6 @@ user_pref("extensions.blocklist.itemURL", "http://{server}/extensions-dummy/bloc user_pref("extensions.blocklist.url", "http://{server}/extensions-dummy/blocklistURL"); // XPI extensions are required for test harnesses to load user_pref("extensions.defaultProviders.enabled", true); -// Disable metadata caching for installed add-ons by default -user_pref("extensions.getAddons.cache.enabled", false); -// Make sure AddonRepository won't hit the network -user_pref("extensions.getAddons.get.url", "http://{server}/extensions-dummy/repositoryGetURL"); -user_pref("extensions.getAddons.getWithPerformance.url", "http://{server}/extensions-dummy/repositoryGetWithPerformanceURL"); -user_pref("extensions.getAddons.search.browseURL", "http://{server}/extensions-dummy/repositoryBrowseURL"); -user_pref("extensions.hotfix.url", "http://{server}/extensions-dummy/hotfixURL"); // Disable intalling any distribution add-ons user_pref("extensions.installDistroAddons", false); // Disable Screenshots by default for now @@ -120,8 +113,6 @@ user_pref("extensions.systemAddon.update.url", "http://{server}/dummy-system-add user_pref("extensions.update.background.url", "http://{server}/extensions-dummy/updateBackgroundURL"); // Point update checks to the local testing server for fast failures user_pref("extensions.update.url", "http://{server}/extensions-dummy/updateURL"); -// Make sure opening about:addons won't hit the network -user_pref("extensions.webservice.discoverURL", "http://{server}/extensions-dummy/discoveryURL"); user_pref("extensions.privatebrowsing.notification", true); user_pref("findbar.highlightAll", false); user_pref("findbar.modalHighlight", false); diff --git a/testing/talos/talos/test.py b/testing/talos/talos/test.py index 989a75573f..71ed35f1a5 100644 --- a/testing/talos/talos/test.py +++ b/testing/talos/talos/test.py @@ -153,7 +153,6 @@ class ts_paint(TsBase): @register_test() class ts_paint_webext(ts_paint): webextensions = '${talos}/webextensions/dummy/dummy.xpi' - preferences = {'xpinstall.signatures.required': False} @register_test() @@ -555,7 +554,6 @@ class tp5o(PageloaderTest): @register_test() class tp5o_webext(tp5o): webextensions = '${talos}/webextensions/dummy/dummy.xpi' - preferences = {'xpinstall.signatures.required': False} @register_test() diff --git a/testing/talos/talos/unittests/test_config.py b/testing/talos/talos/unittests/test_config.py index add801ec15..c1a4ffc1bc 100644 --- a/testing/talos/talos/unittests/test_config.py +++ b/testing/talos/talos/unittests/test_config.py @@ -313,7 +313,6 @@ def test_ts_paint_webext_has_expected_attributes(self): # assert test_config['unit'] == 'ms' # TODO: this isn't overriden # assert test_config['webextensions'] != '${talos}/webextensions/dummy/dummy-signed.xpi' - assert test_config['preferences'] == {'xpinstall.signatures.required': False} def test_ts_paint_heavy_has_expected_attributes(self): config = get_config(self.argv_ts_paint_heavy) @@ -633,7 +632,6 @@ def test_tp5o_webext_has_expected_attributes(self): assert test_config['timeout'] == 1800 assert test_config['unit'] == 'ms' assert test_config['webextensions'] == '${talos}/webextensions/dummy/dummy.xpi' - assert test_config['preferences'] == {'xpinstall.signatures.required': False} @mock.patch('talos.config.build_manifest', conftest.patched_build_manifest) def test_tp5o_scroll_has_expected_attributes(self): diff --git a/testing/talos/talos/unittests/test_talosconfig_browser_config.json b/testing/talos/talos/unittests/test_talosconfig_browser_config.json index eb07adce2f..280ad47669 100644 --- a/testing/talos/talos/unittests/test_talosconfig_browser_config.json +++ b/testing/talos/talos/unittests/test_talosconfig_browser_config.json @@ -1 +1 @@ -{'deviceroot': '', 'dirs': {}, 'repository': 'https://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'extensions.getAddons.get.url': 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.checkInstallTime': False, 'app.update.disabledForTesting': True, 'extensions.blocklist.url': 'http://127.0.0.1/extensions-dummy/blocklistURL', 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'extensions.hotfix.url': 'http://127.0.0.1/extensions-dummy/hotfixURL', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False, 'browser.link.open_newwindow': 2, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'browser.cache.disk.smart_size.enabled': False, 'extensions.getAddons.getWithPerformance.url': 'http://127.0.0.1/extensions-dummy/repositoryGetWithPerformanceURL', 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'extensions.webservice.discoverURL': 'http://127.0.0.1/extensions-dummy/discoveryURL'}, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5} +{'deviceroot': '', 'dirs': {}, 'repository': 'https://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.checkInstallTime': False, 'app.update.disabledForTesting': True, 'extensions.blocklist.url': 'http://127.0.0.1/extensions-dummy/blocklistURL', 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False, 'browser.link.open_newwindow': 2, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'browser.cache.disk.smart_size.enabled': False, 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5} diff --git a/testing/tps/tps/testrunner.py b/testing/tps/tps/testrunner.py index 97a3f37458..7b9370ab0d 100644 --- a/testing/tps/tps/testrunner.py +++ b/testing/tps/tps/testrunner.py @@ -65,9 +65,6 @@ class TPSTestRunner(object): 'browser.warnOnQuit': False, # Allow installing extensions dropped into the profile folder 'extensions.autoDisableScopes': 10, - 'extensions.getAddons.get.url': 'http://127.0.0.1:4567/addons/api/%IDS%.json', - # Our pretend addons server doesn't support metadata... - 'extensions.getAddons.cache.enabled': False, 'extensions.install.requireSecureOrigin': False, 'extensions.update.enabled': False, # Don't open a dialog to show available add-on updates @@ -77,10 +74,8 @@ class TPSTestRunner(object): 'services.sync.autoconnectDelay': 60 * 60 * 10, 'toolkit.startup.max_resumed_crashes': -1, # hrm - not sure what the release/beta channels will do? - 'xpinstall.signatures.required': False, 'services.sync.testing.tps': True, 'engine.bookmarks.repair.enabled': False, - 'extensions.legacy.enabled': True, } debug_preferences = { diff --git a/toolkit/components/extensions/Extension.jsm b/toolkit/components/extensions/Extension.jsm index 1b3794e490..b2c5d4a256 100644 --- a/toolkit/components/extensions/Extension.jsm +++ b/toolkit/components/extensions/Extension.jsm @@ -45,7 +45,6 @@ XPCOMUtils.defineLazyModuleGetters(this, { AddonManager: "resource://gre/modules/AddonManager.jsm", AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm", AddonSettings: "resource://gre/modules/addons/AddonSettings.jsm", - AMTelemetry: "resource://gre/modules/AddonManager.jsm", AppConstants: "resource://gre/modules/AppConstants.jsm", AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm", ExtensionPermissions: "resource://gre/modules/ExtensionPermissions.jsm", @@ -1844,14 +1843,12 @@ class Extension extends ExtensionData { return ( this.addonData.signedState === AddonManager.SIGNEDSTATE_PRIVILEGED || this.addonData.signedState === AddonManager.SIGNEDSTATE_SYSTEM || - this.addonData.builtIn || - (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS && - this.addonData.temporarilyInstalled) + this.addonData.builtIn ); } get experimentsAllowed() { - return AddonSettings.ALLOW_LEGACY_EXTENSIONS || this.isPrivileged; + return this.isPrivileged; } saveStartupData() { @@ -2143,15 +2140,6 @@ class Extension extends ExtensionData { origins: [], }); await StartupCache.clearAddonData(addonData.id); - - // Record a telemetry event for the extension automatically allowed on private browsing as - // part of the Firefox upgrade. - AMTelemetry.recordActionEvent({ - extra: { addonId: addonData.id }, - object: "appUpgrade", - action: "privateBrowsingAllowed", - value: "on", - }); } } diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_experiment.js b/toolkit/components/extensions/test/browser/browser_ext_themes_experiment.js index e1efe37eba..7d78826fda 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_experiment.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_experiment.js @@ -2,14 +2,6 @@ // This test checks whether the theme experiments work -add_task(async function setup() { - await SpecialPowers.pushPrefEnv({ - set: [ - ["extensions.legacy.enabled", AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS], - ], - }); -}); - add_task(async function test_experiment_static_theme() { let extension = ExtensionTestUtils.loadExtension({ manifest: { @@ -59,46 +51,28 @@ add_task(async function test_experiment_static_theme() { await extension.startup(); const testExperimentApplied = rootEl => { - if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS) { - is( - rootEl.style.getPropertyValue("--some-color-property"), - hexToCSS("#ff00ff"), - "Color property should be parsed and set." - ); - ok( - rootEl.style - .getPropertyValue("--some-image-property") - .startsWith("url("), - "Image property should be parsed." - ); - ok( - rootEl.style - .getPropertyValue("--some-image-property") - .endsWith("background.jpg)"), - "Image property should be set." - ); - is( - rootEl.style.getPropertyValue("--some-random-property"), - "no-repeat", - "Generic Property should be set." - ); - } else { - is( - rootEl.style.getPropertyValue("--some-color-property"), - "", - "Color property should be unset" - ); - is( - rootEl.style.getPropertyValue("--some-image-property"), - "", - "Image property should be unset" - ); - is( - rootEl.style.getPropertyValue("--some-random-property"), - "", - "Generic Property should be unset." - ); - } + is( + rootEl.style.getPropertyValue("--some-color-property"), + hexToCSS("#ff00ff"), + "Color property should be parsed and set." + ); + ok( + rootEl.style + .getPropertyValue("--some-image-property") + .startsWith("url("), + "Image property should be parsed." + ); + ok( + rootEl.style + .getPropertyValue("--some-image-property") + .endsWith("background.jpg)"), + "Image property should be set." + ); + is( + rootEl.style.getPropertyValue("--some-random-property"), + "no-repeat", + "Generic Property should be set." + ); }; info("Testing that current window updated with the experiment applied"); @@ -198,46 +172,28 @@ add_task(async function test_experiment_dynamic_theme() { await extension.awaitMessage("theme-updated"); const testExperimentApplied = rootEl => { - if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS) { - is( - rootEl.style.getPropertyValue("--some-color-property"), - hexToCSS("#ff00ff"), - "Color property should be parsed and set." - ); - ok( - rootEl.style - .getPropertyValue("--some-image-property") - .startsWith("url("), - "Image property should be parsed." - ); - ok( - rootEl.style - .getPropertyValue("--some-image-property") - .endsWith("background.jpg)"), - "Image property should be set." - ); - is( - rootEl.style.getPropertyValue("--some-random-property"), - "no-repeat", - "Generic Property should be set." - ); - } else { - is( - rootEl.style.getPropertyValue("--some-color-property"), - "", - "Color property should be unset" - ); - is( - rootEl.style.getPropertyValue("--some-image-property"), - "", - "Image property should be unset" - ); - is( - rootEl.style.getPropertyValue("--some-random-property"), - "", - "Generic Property should be unset." - ); - } + is( + rootEl.style.getPropertyValue("--some-color-property"), + hexToCSS("#ff00ff"), + "Color property should be parsed and set." + ); + ok( + rootEl.style + .getPropertyValue("--some-image-property") + .startsWith("url("), + "Image property should be parsed." + ); + ok( + rootEl.style + .getPropertyValue("--some-image-property") + .endsWith("background.jpg)"), + "Image property should be set." + ); + is( + rootEl.style.getPropertyValue("--some-random-property"), + "no-repeat", + "Generic Property should be set." + ); }; testExperimentApplied(root); @@ -343,44 +299,26 @@ add_task(async function test_experiment_stylesheet() { await extension.startup(); - if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS) { - // Wait for stylesheet load. - await BrowserTestUtils.waitForCondition( - () => computedStyle.fill === expectedFill - ); + // Wait for stylesheet load. + await BrowserTestUtils.waitForCondition( + () => computedStyle.fill === expectedFill + ); - is( - root.style.getPropertyValue("--menu-button-background"), - expectedColor, - "Variable should be parsed and set." - ); - is( - computedStyle.backgroundColor, - expectedColor, - "Menu button should be have correct background" - ); - is( - computedStyle.fill, - expectedFill, - "Menu button should be have correct fill" - ); - } else { - is( - root.style.getPropertyValue("--menu-button-background"), - "", - "Variable should be unset" - ); - isnot( - computedStyle.backgroundColor, - expectedColor, - "Menu button should not have custom background" - ); - isnot( - computedStyle.fill, - expectedFill, - "Menu button should not have stylesheet fill" - ); - } + is( + root.style.getPropertyValue("--menu-button-background"), + expectedColor, + "Variable should be parsed and set." + ); + is( + computedStyle.backgroundColor, + expectedColor, + "Menu button should be have correct background" + ); + is( + computedStyle.fill, + expectedFill, + "Menu button should be have correct fill" + ); await extension.unload(); diff --git a/toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js b/toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js index c126d3a2f3..8d33bad074 100644 --- a/toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js +++ b/toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js @@ -73,76 +73,3 @@ add_task(async function test_dynamic_theme() { await extension.unload(); }); - -add_task(async function test_experiments_enabled() { - await SpecialPowers.pushPrefEnv({ - set: [ - ["extensions.legacy.enabled", AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS], - ], - }); - - info( - "Testing that experiments are handled correctly when legacy pref is enabled" - ); - - const extension = ExtensionTestUtils.loadExtension({ - manifest: { - theme: { - properties: { - such_property: "much_wow", - unknown_property: "very_unknown", - }, - }, - theme_experiment: { - properties: { - such_property: "--such-property", - }, - }, - }, - }); - if (!AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS) { - await waitForConsole( - extension.startup, - "This extension is not allowed to run theme experiments" - ); - } else { - await waitForConsole( - extension.startup, - "Unrecognized theme property found: properties.unknown_property" - ); - } - await extension.unload(); - - await SpecialPowers.popPrefEnv(); -}); - -add_task(async function test_experiments_disabled() { - await SpecialPowers.pushPrefEnv({ - set: [["extensions.legacy.enabled", false]], - }); - - info( - "Testing that experiments are handled correctly when legacy pref is disabled" - ); - - const extension = ExtensionTestUtils.loadExtension({ - manifest: { - theme: { - properties: { - such_property: "much_wow", - }, - }, - theme_experiment: { - properties: { - such_property: "--such-property", - }, - }, - }, - }); - await waitForConsole( - extension.startup, - "This extension is not allowed to run theme experiments" - ); - await extension.unload(); - await SpecialPowers.popPrefEnv(); -}); diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_experiments.js b/toolkit/components/extensions/test/xpcshell/test_ext_experiments.js index fd4d16ae9a..0b26dc4a27 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_experiments.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_experiments.js @@ -160,7 +160,7 @@ add_task(async function test_bundled_experiments() { { isPrivileged: false, temporarilyInstalled: true, - shouldHaveExperiments: AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS, + shouldHaveExperiments: true, }, { isPrivileged: false, diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_incognito.js b/toolkit/components/extensions/test/xpcshell/test_ext_incognito.js index 7981f3be2f..44613820d2 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_incognito.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_incognito.js @@ -14,38 +14,6 @@ AddonTestUtils.createAppInfo( ); AddonTestUtils.usePrivilegedSignatures = false; -// Assert on the expected "addonsManager.action" telemetry events (and optional filter events to verify -// by using a given actionType). -function assertActionAMTelemetryEvent( - expectedActionEvents, - assertMessage, - { actionType } = {} -) { - const snapshot = Services.telemetry.snapshotEvents( - Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS, - true - ); - - ok( - snapshot.parent && snapshot.parent.length > 0, - "Got parent telemetry events in the snapshot" - ); - - const events = snapshot.parent - .filter(([timestamp, category, method, object, value, extra]) => { - return ( - category === "addonsManager" && - method === "action" && - (!actionType ? true : extra && extra.action === actionType) - ); - }) - .map(([timestamp, category, method, object, value, extra]) => { - return { method, object, value, extra }; - }); - - Assert.deepEqual(events, expectedActionEvents, assertMessage); -} - async function runIncognitoTest( extensionData, privateBrowsingAllowed, @@ -221,10 +189,4 @@ add_task(async function test_extension_incognito_spanning_grandfathered() { extra: { addonId, action: "privateBrowsingAllowed" }, }, ]; - - assertActionAMTelemetryEvent( - expectedEvents, - "Got the expected telemetry events for the grandfathered extensions", - { actionType: "privateBrowsingAllowed" } - ); }); diff --git a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm index 9eb86f642a..fb9f0d9712 100644 --- a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm @@ -255,7 +255,6 @@ const DEFAULT_ENVIRONMENT_PREFS = new Map([ ["extensions.formautofill.addresses.enabled", { what: RECORD_PREF_VALUE }], ["extensions.formautofill.creditCards.enabled", { what: RECORD_PREF_VALUE }], ["extensions.htmlaboutaddons.enabled", { what: RECORD_PREF_VALUE }], - ["extensions.legacy.enabled", { what: RECORD_PREF_VALUE }], ["extensions.strictCompatibility", { what: RECORD_PREF_VALUE }], ["extensions.update.enabled", { what: RECORD_PREF_VALUE }], ["extensions.update.url", { what: RECORD_PREF_VALUE }], @@ -298,7 +297,6 @@ const DEFAULT_ENVIRONMENT_PREFS = new Map([ ["security.pki.mitm_detected", { what: RECORD_PREF_VALUE }], ["security.mixed_content.block_active_content", { what: RECORD_PREF_VALUE }], ["security.mixed_content.block_display_content", { what: RECORD_PREF_VALUE }], - ["xpinstall.signatures.required", { what: RECORD_PREF_VALUE }], ]); const LOGGER_NAME = "Toolkit.Telemetry"; diff --git a/toolkit/components/telemetry/tests/browser/browser_HybridContentTelemetry.js b/toolkit/components/telemetry/tests/browser/browser_HybridContentTelemetry.js index e3b332cc89..9c4cf7d616 100644 --- a/toolkit/components/telemetry/tests/browser/browser_HybridContentTelemetry.js +++ b/toolkit/components/telemetry/tests/browser/browser_HybridContentTelemetry.js @@ -471,21 +471,6 @@ add_task(async function test_can_upload() { PermissionTestUtils.remove(testHttpsUri, HC_PERMISSION); }); -add_task(async function test_hct_for_discopane() { - const discoHost = "https://discovery.addons.mozilla.org"; - - let discoHttpsUri = Services.io.newURI(discoHost); - let permission = PermissionTestUtils.testPermission( - discoHttpsUri, - HC_PERMISSION - ); - - ok( - permission == Services.perms.ALLOW_ACTION, - "Disco Pane needs Hybrid Content Permission for Telemetry data upload" - ); -}); - add_task(async function test_init_rejects() { await SpecialPowers.pushPrefEnv({ set: [[TelemetryUtils.Preferences.FhrUploadEnabled, true]], diff --git a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties index 78d30d9dbc..7652a634ce 100644 --- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties +++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties @@ -5,11 +5,6 @@ #LOCALIZATION NOTE (uninstallNotice) %S is the add-on name uninstallNotice=%S has been removed. -#LOCALIZATION NOTE (numReviews): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the number of reviews -numReviews=#1 review;#1 reviews - #LOCALIZATION NOTE (dateUpdated) %S is the date the addon was last updated dateUpdated=Updated %S @@ -61,7 +56,6 @@ installCancelled=Install cancelled #LOCALIZATION NOTE (details.notification.incompatible) %1$S is the add-on name, %2$S is brand name, %3$S is application version details.notification.incompatible=%1$S is incompatible with %2$S %3$S. #LOCALIZATION NOTE (details.notification.unsigned, details.notification.unsignedAndDisabled) %1$S is the add-on name, %2$S is brand name -details.notification.unsignedAndDisabled=%1$S could not be verified for use in %2$S and has been disabled. details.notification.unsigned=%1$S could not be verified for use in %2$S. Proceed with caution. details.notification.unsigned.link=More Information #LOCALIZATION NOTE (details.notification.blocked) %1$S is the add-on name @@ -100,11 +94,6 @@ type.service.name=Services type.legacy.name=Legacy Extensions type.unsupported.name=Unsupported -#LOCALIZATION NOTE(legacyWarning.description) %S is the brandShortName -legacyWarning.description=Missing something? Some extensions are no longer supported by %S. -#LOCALIZATION NOTE(legacyThemeWarning.description) %S is the brandShortName -legacyThemeWarning.description=Missing something? Some themes are no longer supported by %S. - #LOCALIZATION NOTE(listHeading.discover) %S is the brandShortName listHeading.discover=Personalize Your %S listHeading.extension=Manage Your Extensions diff --git a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl index cc28fd5bd1..65fe16bf11 100644 --- a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl +++ b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl @@ -192,30 +192,9 @@ detail-rating = addon-restart-now = .label = Restart now -disabled-unsigned-heading = - .value = Some add-ons have been disabled - -disabled-unsigned-description = - The following add-ons have not been verified for use in { -brand-short-name }. You can - or ask the developer to get them verified. - -disabled-unsigned-learn-more = Learn more about our efforts to help keep you safe online. - -disabled-unsigned-devinfo = - Developers interested in getting their add-ons verified can continue by reading our - . - plugin-deprecation-description = Missing something? Some plugins are no longer supported by { -brand-short-name }. -legacy-warning-show-legacy = Show legacy extensions - -legacy-extensions = - .value = Legacy Extensions - -legacy-extensions-description = - These extensions do not meet current { -brand-short-name } standards so they have been deactivated. - private-browsing-description2 = { -brand-short-name } is changing how extensions work in private browsing. Any new extensions you add to { -brand-short-name } won’t run by default in Private Windows. Unless you allow it in settings, the @@ -223,10 +202,6 @@ private-browsing-description2 = there. We’ve made this change to keep your private browsing private. -extensions-view-discopane = - .name = Recommendations - .tooltiptext = { extensions-view-discopane.name } - extensions-view-recent-updates = .name = Recent Updates .tooltiptext = { extensions-view-recent-updates.name } @@ -343,24 +318,6 @@ shortcuts-card-collapse-button = Show Less go-back-button = .tooltiptext = Go back -## Recommended add-ons page - -# Explanatory introduction to the list of recommended add-ons. The action word -# ("recommends") in the final sentence is a link to external documentation. -discopane-intro = - Extensions and themes are like apps for your browser, and they let you - protect passwords, download videos, find deals, block annoying ads, change - how your browser looks, and much more. These small software programs are - often developed by a third party. Here’s a selection { -brand-product-name } - recommends for exceptional - security, performance, and functionality. - -# Notice to make user aware that the recommendations are personalized. -discopane-notice-recommendations = - Some of these recommendations are personalized. They are based on other - extensions you’ve installed, profile preferences, and usage statistics. -discopane-notice-learn-more = Learn more - privacy-policy = Privacy Policy # Refers to the author of an add-on, shown below the name of the add-on. @@ -404,7 +361,6 @@ addon-detail-author-label = Author addon-detail-version-label = Version addon-detail-last-updated-label = Last Updated addon-detail-homepage-label = Homepage -addon-detail-rating-label = Rating # The average rating that the add-on has received. # Variables: @@ -417,15 +373,6 @@ five-star-rating = # $name (string) - The name of the add-on addon-name-disabled = { $name } (disabled) -# The number of reviews that an add-on has received on AMO. -# Variables: -# $numberOfReviews (number) - The number of reviews received -addon-detail-reviews-link = - { $numberOfReviews -> - [one] { $numberOfReviews } review - *[other] { $numberOfReviews } reviews - } - ## Pending uninstall message bar # Variables: @@ -448,12 +395,6 @@ addon-detail-private-browsing-help = When allowed, the extension will have acces addon-detail-private-browsing-allow = Allow addon-detail-private-browsing-disallow = Don’t Allow -# This is the tooltip text for the recommended badge for an extension in about:addons. The -# badge is a small icon displayed next to an extension when it is recommended on AMO. -addon-badge-recommended = - .title = Recommended - .alt = Recommended - available-updates-heading = Available Updates recent-updates-heading = Recent Updates @@ -461,10 +402,3 @@ release-notes-loading = Loading… release-notes-error = Sorry, but there was an error loading the release notes. addon-permissions-empty = This extension doesn’t require any permissions - -recommended-extensions-heading = Recommended Extensions -recommended-themes-heading = Recommended Themes - -# A recommendation for the Firefox Color theme shown at the bottom of the theme -# list view. The "Firefox Color" name itself should not be translated. -recommended-theme-1 = Feeling creative? Build your own theme with Firefox Color. diff --git a/toolkit/locales/en-US/toolkit/about/abuseReports.ftl b/toolkit/locales/en-US/toolkit/about/abuseReports.ftl deleted file mode 100644 index 7b4e47486d..0000000000 --- a/toolkit/locales/en-US/toolkit/about/abuseReports.ftl +++ /dev/null @@ -1,92 +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/. - -abuse-report-title-extension = Report This Extension to { -vendor-short-name } -abuse-report-title-theme = Report This Theme to { -vendor-short-name } -abuse-report-subtitle = What’s the issue? - -# Variables: -# $author-name (string) - Name of the add-on author -abuse-report-addon-authored-by = by { $author-name } - -abuse-report-learnmore = - Unsure what issue to select? - Learn more about reporting extensions and themes - -abuse-report-submit-description = Describe the problem (optional) -abuse-report-textarea = - .placeholder = It’s easier for us to address a problem if we have specifics. Please describe what you’re experiencing. Thank you for helping us keep the web healthy. -abuse-report-submit-note = - Note: Don’t include personal information (such as name, email address, phone number, physical address). - { -vendor-short-name } keeps a permanent record of these reports. - -## Panel buttons. - -abuse-report-cancel-button = Cancel -abuse-report-next-button = Next -abuse-report-goback-button = Go back -abuse-report-submit-button = Submit - -## Message bars descriptions. - -## Variables: -## $addon-name (string) - Name of the add-on -abuse-report-messagebar-aborted = Report for { $addon-name } canceled. -abuse-report-messagebar-submitting = Sending report for { $addon-name }. -abuse-report-messagebar-submitted = Thank you for submitting a report. Do you want to remove { $addon-name }? -abuse-report-messagebar-submitted-noremove = Thank you for submitting a report. -abuse-report-messagebar-removed-extension = Thank you for submitting a report. You’ve removed the extension { $addon-name }. -abuse-report-messagebar-removed-theme = Thank you for submitting a report. You’ve removed the theme { $addon-name }. -abuse-report-messagebar-error = There was an error sending the report for { $addon-name }. -abuse-report-messagebar-error-recent-submit = The report for { $addon-name } wasn’t sent because another report was submitted recently. - -## Message bars actions. - -abuse-report-messagebar-action-remove-extension = Yes, Remove It -abuse-report-messagebar-action-keep-extension = No, I’ll Keep It -abuse-report-messagebar-action-remove-theme = Yes, Remove It -abuse-report-messagebar-action-keep-theme = No, I’ll Keep It -abuse-report-messagebar-action-retry = Retry -abuse-report-messagebar-action-cancel = Cancel - -## Abuse report reasons (optionally paired with related examples and/or suggestions) - -abuse-report-damage-reason = Damages my computer and data -abuse-report-damage-example = Example: Injected malware or stole data - -abuse-report-spam-reason = Creates spam or advertising -abuse-report-spam-example = Example: Insert ads on webpages - -abuse-report-settings-reason = Changed my search engine, homepage, or new tab without informing or asking me -abuse-report-settings-suggestions = Before reporting the extension, you can try changing your settings: -abuse-report-settings-suggestions-search = Change your default search settings -abuse-report-settings-suggestions-homepage = Change your homepage and new tab - -abuse-report-deceptive-reason = Pretend to be something it’s not -abuse-report-deceptive-example = Example: Misleading description or imagery - -abuse-report-broken-reason-extension = Doesn’t work, breaks websites, or slows { -brand-product-name } down -abuse-report-broken-reason-theme = Doesn’t work or breaks browser display -abuse-report-broken-example = - Example: Features are slow, hard to use, or don’t work; parts of websites won’t load or look unusual -abuse-report-broken-suggestions-extension = - It sounds like you’ve identified a bug. In addition to submitting a report here, the best way - to get a functionality issue resolved is to contact the extension developer. - Visit the extension’s website to get the developer information. -abuse-report-broken-suggestions-theme = - It sounds like you’ve identified a bug. In addition to submitting a report here, the best way - to get a functionality issue resolved is to contact the theme developer. - Visit the theme’s website to get the developer information. - -abuse-report-policy-reason = Hateful, violent, or illegal content -abuse-report-policy-suggestions = - Note: Copyright and trademark issues must be reported in a separate process. - Use these instructions to - report the problem. - -abuse-report-unwanted-reason = Never wanted this extension and can’t get rid of it -abuse-report-unwanted-example = Example: An application installed it without my permission - -abuse-report-other-reason = Something else - diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm index 1f47c364ca..b42153da92 100644 --- a/toolkit/modules/AppConstants.jsm +++ b/toolkit/modules/AppConstants.jsm @@ -243,13 +243,6 @@ this.AppConstants = Object.freeze({ false, #endif - MOZ_REQUIRE_SIGNING: -#ifdef MOZ_REQUIRE_SIGNING - true, -#else - false, -#endif - get MOZ_UNSIGNED_SCOPES() { let result = 0; #ifdef MOZ_UNSIGNED_APP_SCOPE @@ -261,13 +254,6 @@ this.AppConstants = Object.freeze({ return result; }, - MOZ_ALLOW_LEGACY_EXTENSIONS: -#ifdef MOZ_ALLOW_LEGACY_EXTENSIONS - true, -#else - false, -#endif - MENUBAR_CAN_AUTOHIDE: #ifdef MENUBAR_CAN_AUTOHIDE true, diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 52074247c4..54d2ff7378 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -621,18 +621,6 @@ project_flag('MOZ_BLOCK_PROFILE_DOWNGRADE', help='Block users from starting profiles last used by a newer build', set_as_define=True) -option(env='MOZ_ALLOW_LEGACY_EXTENSIONS', - default=milestone.is_nightly, - help='Allow legacy browser extensions') - -@depends('MOZ_ALLOW_LEGACY_EXTENSIONS') -def legacy_extensions(value): - if bool(value): - return True - -set_config('MOZ_ALLOW_LEGACY_EXTENSIONS', legacy_extensions) -set_define('MOZ_ALLOW_LEGACY_EXTENSIONS', legacy_extensions) - @depends('MOZ_PLACES', 'MOZ_ANDROID_HISTORY') def check_places_and_android_history(places, android_history): if places and android_history: diff --git a/toolkit/mozapps/extensions/AbuseReporter.jsm b/toolkit/mozapps/extensions/AbuseReporter.jsm deleted file mode 100644 index baaa2a4475..0000000000 --- a/toolkit/mozapps/extensions/AbuseReporter.jsm +++ /dev/null @@ -1,395 +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/. */ - -const EXPORTED_SYMBOLS = ["AbuseReporter", "AbuseReportError"]; - -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" -); - -Cu.importGlobalProperties(["fetch"]); - -const PREF_ABUSE_REPORT_URL = "extensions.abuseReport.url"; - -// Maximum length of the string properties sent to the API endpoint. -const MAX_STRING_LENGTH = 255; - -// Minimum time between report submissions (in ms). -const MIN_MS_BETWEEN_SUBMITS = 30000; - -XPCOMUtils.defineLazyModuleGetters(this, { - AddonManager: "resource://gre/modules/AddonManager.jsm", - AMTelemetry: "resource://gre/modules/AddonManager.jsm", - AppConstants: "resource://gre/modules/AppConstants.jsm", - ClientID: "resource://gre/modules/ClientID.jsm", - Services: "resource://gre/modules/Services.jsm", -}); - -XPCOMUtils.defineLazyPreferenceGetter( - this, - "ABUSE_REPORT_URL", - PREF_ABUSE_REPORT_URL -); - -const PRIVATE_REPORT_PROPS = Symbol("privateReportProps"); - -const ERROR_TYPES = Object.freeze([ - "ERROR_ABORTED_SUBMIT", - "ERROR_ADDON_NOTFOUND", - "ERROR_CLIENT", - "ERROR_NETWORK", - "ERROR_UNKNOWN", - "ERROR_RECENT_SUBMIT", - "ERROR_SERVER", -]); - -class AbuseReportError extends Error { - constructor(errorType, errorInfo = undefined) { - if (!ERROR_TYPES.includes(errorType)) { - throw new Error(`Unknown AbuseReportError type "${errorType}"`); - } - - let message = errorInfo ? `${errorType} - ${errorInfo}` : errorType; - - super(message); - this.name = "AbuseReportError"; - this.errorType = errorType; - this.errorInfo = errorInfo; - } -} - -/** - * A singleton object used to create new AbuseReport instances for a given addonId - * and enforce a minium amount of time between two report submissions . - */ -const AbuseReporter = { - _lastReportTimestamp: null, - - // Error types. - updateLastReportTimestamp() { - this._lastReportTimestamp = Date.now(); - }, - - getTimeFromLastReport() { - const currentTimestamp = Date.now(); - if (this._lastReportTimestamp > currentTimestamp) { - // Reset the last report timestamp if it is in the future. - this._lastReportTimestamp = null; - } - - if (!this._lastReportTimestamp) { - return Infinity; - } - - return currentTimestamp - this._lastReportTimestamp; - }, - - /** - * Create an AbuseReport instance, given the addonId and a reportEntryPoint. - * - * @param {string} addonId - * The id of the addon to create the report instance for. - * @param {object} options - * @param {string} options.reportEntryPoint - * An identifier that represent the entry point for the report flow. - * - * @returns {AbuseReport} - * An instance of the AbuseReport class, which represent an ongoing - * report. - */ - async createAbuseReport(addonId, { reportEntryPoint } = {}) { - const addon = await AddonManager.getAddonByID(addonId); - - if (!addon) { - AMTelemetry.recordReportEvent({ - addonId, - errorType: "ERROR_ADDON_NOTFOUND", - reportEntryPoint, - }); - throw new AbuseReportError("ERROR_ADDON_NOTFOUND"); - } - - const reportData = await this.getReportData(addon); - - return new AbuseReport({ - addon, - reportData, - reportEntryPoint, - }); - }, - - /** - * Helper function that retrieves from an addon object all the data to send - * as part of the submission request, besides the `reason`, `message` which are - * going to be received from the submit method of the report object returned - * by `createAbuseReport`. - * (See https://addons-server.readthedocs.io/en/latest/topics/api/abuse.html) - * - * @param {AddonWrapper} addon - * The addon object to collect the detail from. - * - * @return {object} - * An object that contains the collected details. - */ - async getReportData(addon) { - const truncateString = text => - typeof text == "string" ? text.slice(0, MAX_STRING_LENGTH) : text; - - let installInfo = addon.installTelemetryInfo; - - const data = { - addon: addon.id, - addon_version: addon.version, - addon_name: truncateString(addon.name), - addon_summary: truncateString(addon.description), - addon_install_origin: - addon.sourceURI && truncateString(addon.sourceURI.spec), - addon_install_source_url: - installInfo && - installInfo.sourceURL && - truncateString(installInfo.sourceURL), - install_date: addon.installDate && addon.installDate.toISOString(), - }; - - // Map addon.installTelemetryInfo values to the supported addon_install_method - // values supported by the API endpoint (See API endpoint docs at - // https://addons-server.readthedocs.io/en/latest/topics/api/abuse.html). - let install_method = "other"; - if (installInfo) { - const { source, method } = installInfo; - switch (source) { - case "enterprise-policy": - case "file-url": - case "system-addon": - case "temporary-addon": - install_method = source.replace(/-/g, "_"); - break; - case "distribution": - case "sync": - install_method = source; - break; - default: - install_method = "other"; - } - - switch (method) { - case "sideload": - case "link": - install_method = method; - break; - case "amWebAPI": - case "installTrigger": - install_method = method.toLowerCase(); - break; - case "drag-and-drop": - case "install-from-file": - case "management-webext-api": - install_method = method.replace(/-/g, "_"); - break; - } - } - data.addon_install_method = install_method; - - switch (addon.signedState) { - case AddonManager.SIGNEDSTATE_BROKEN: - data.addon_signature = "broken"; - break; - case AddonManager.SIGNEDSTATE_UNKNOWN: - data.addon_signature = "unknown"; - break; - case AddonManager.SIGNEDSTATE_MISSING: - data.addon_signature = "missing"; - break; - case AddonManager.SIGNEDSTATE_PRELIMINARY: - data.addon_signature = "preliminary"; - break; - case AddonManager.SIGNEDSTATE_SIGNED: - data.addon_signature = "signed"; - break; - case AddonManager.SIGNEDSTATE_SYSTEM: - data.addon_signature = "system"; - break; - case AddonManager.SIGNEDSTATE_PRIVILEGED: - data.addon_signature = "privileged"; - break; - default: - data.addon_signature = `unknown: ${addon.signedState}`; - } - - // Set "curated" as addon_signature on recommended addons - // (addon.isRecommended internally checks that the addon is also - // signed correctly). - if (addon.isRecommended) { - data.addon_signature = "curated"; - } - - data.client_id = await ClientID.getClientIdHash(); - - data.app = Services.appinfo.name.toLowerCase(); - data.appversion = Services.appinfo.version; - data.lang = Services.locale.appLocaleAsLangTag; - data.operating_system = AppConstants.platform; - data.operating_system_version = Services.sysinfo.getProperty("version"); - - return data; - }, -}; - -/** - * Represents an ongoing abuse report. Instances of this class are created - * by the `AbuseReporter.createAbuseReport` method. - * - * This object is used by the reporting UI panel and message bars to: - * - * - get an errorType in case of a report creation error (e.g. because of a - * previously submitted report) - * - get the addon details used inside the reporting panel - * - submit the abuse report (and re-submit if a previous submission failed - * and the user choose to retry to submit it again) - * - abort an ongoing submission - * - * @param {object} options - * @param {AddonWrapper|null} options.addon - * AddonWrapper instance for the extension/theme being reported. - * (May be null if the extension has not been found). - * @param {object|null} options.reportData - * An object which contains addon and environment details to send as part of a submission - * (may be null if the report has a createErrorType). - * @param {string} options.reportEntryPoint - * A string that identify how the report has been triggered. - */ -class AbuseReport { - constructor({ addon, createErrorType, reportData, reportEntryPoint }) { - this[PRIVATE_REPORT_PROPS] = { - aborted: false, - abortController: new AbortController(), - addon, - reportData, - reportEntryPoint, - }; - } - - recordTelemetry(errorType) { - const { addon, reportEntryPoint } = this; - AMTelemetry.recordReportEvent({ - addonId: addon.id, - addonType: addon.type, - errorType, - reportEntryPoint, - }); - } - - /** - * Submit the current report, given a reason and a message. - * - * @params {object} options - * @params {string} options.reason - * String identifier for the report reason. - * @params {string} [options.message] - * An optional string which contains a description for the reported issue. - * - * @returns {Promise} - * Resolves once the report has been successfully submitted. - * It rejects with an AbuseReportError if the report couldn't be - * submitted for a known reason (or another Error type otherwise). - */ - async submit({ reason, message }) { - const { aborted, abortController, reportData, reportEntryPoint } = this[ - PRIVATE_REPORT_PROPS - ]; - - // Record telemetry event and throw an AbuseReportError. - const rejectReportError = async (errorType, { response } = {}) => { - this.recordTelemetry(errorType); - - let errorInfo; - if (response) { - try { - errorInfo = JSON.stringify({ - status: response.status, - responseText: await response.text().catch(err => ""), - }); - } catch (err) { - // leave the errorInfo empty if we failed to stringify it. - } - } - throw new AbuseReportError(errorType, errorInfo); - }; - - if (aborted) { - // Report aborted before being actually submitted. - return rejectReportError("ERROR_ABORTED_SUBMIT"); - } - - // Prevent submit of a new abuse report in less than MIN_MS_BETWEEN_SUBMITS. - let msFromLastReport = AbuseReporter.getTimeFromLastReport(); - if (msFromLastReport < MIN_MS_BETWEEN_SUBMITS) { - return rejectReportError("ERROR_RECENT_SUBMIT"); - } - - let response; - try { - response = await fetch(ABUSE_REPORT_URL, { - signal: abortController.signal, - method: "POST", - credentials: "omit", - referrerPolicy: "no-referrer", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - ...reportData, - report_entry_point: reportEntryPoint, - message, - reason, - }), - }); - } catch (err) { - if (err.name === "AbortError") { - return rejectReportError("ERROR_ABORTED_SUBMIT"); - } - Cu.reportError(err); - return rejectReportError("ERROR_NETWORK"); - } - - if (response.ok && response.status >= 200 && response.status < 400) { - // Ensure that the response is also a valid json format. - try { - await response.json(); - } catch (err) { - this.recordTelemetry("ERROR_UNKNOWN"); - throw err; - } - AbuseReporter.updateLastReportTimestamp(); - this.recordTelemetry(); - return undefined; - } - - if (response.status >= 400 && response.status < 500) { - return rejectReportError("ERROR_CLIENT", { response }); - } - - if (response.status >= 500 && response.status < 600) { - return rejectReportError("ERROR_SERVER", { response }); - } - - // We got an unexpected HTTP status code. - return rejectReportError("ERROR_UNKNOWN", { response }); - } - - /** - * Abort the report submission. - */ - abort() { - const { abortController } = this[PRIVATE_REPORT_PROPS]; - abortController.abort(); - this[PRIVATE_REPORT_PROPS].aborted = true; - } - - get addon() { - return this[PRIVATE_REPORT_PROPS].addon; - } - - get reportEntryPoint() { - return this[PRIVATE_REPORT_PROPS].reportEntryPoint; - } -} diff --git a/toolkit/mozapps/extensions/AddonManager.jsm b/toolkit/mozapps/extensions/AddonManager.jsm index bb81e7790f..c83cd2ecea 100644 --- a/toolkit/mozapps/extensions/AddonManager.jsm +++ b/toolkit/mozapps/extensions/AddonManager.jsm @@ -92,7 +92,7 @@ Services.ppmm.loadProcessScript( const INTEGER = /^[1-9]\d*$/; -var EXPORTED_SYMBOLS = ["AddonManager", "AddonManagerPrivate", "AMTelemetry"]; +var EXPORTED_SYMBOLS = ["AddonManager", "AddonManagerPrivate"]; const CATEGORY_PROVIDER_MODULE = "addon-provider-module"; @@ -588,8 +588,6 @@ var gShutdownInProgress = false; var gPluginPageListener = null; var gBrowserUpdated = null; -var AMTelemetry; - /** * This is the real manager, kept here rather than in AddonManager to keep its * contents hidden from API users. @@ -606,15 +604,9 @@ var AddonManagerInternal = { providerShutdowns: new Map(), types: {}, startupChanges: {}, - // Store telemetry details per addon provider - telemetryDetails: {}, upgradeListeners: new Map(), externalExtensionLoaders: new Map(), - recordTimestamp(name, value) { - this.TelemetryTimestamps.add(name, value); - }, - /** * Start up a provider, and register its shutdown hook if it has one * @@ -695,16 +687,6 @@ var AddonManagerInternal = { return; } - this.recordTimestamp("AMI_startup_begin"); - - // Enable the addonsManager telemetry event category. - AMTelemetry.init(); - - // clear this for xpcshell test restarts - for (let provider in this.telemetryDetails) { - delete this.telemetryDetails[provider]; - } - let appChanged = undefined; let oldAppVersion = null; @@ -886,7 +868,6 @@ var AddonManagerInternal = { ); gStartupComplete = true; - this.recordTimestamp("AMI_startup_end"); } catch (e) { logger.error("startup failed", e); AddonManagerPrivate.recordException("AMI", "startup failed", e); @@ -1345,9 +1326,6 @@ var AddonManagerInternal = { permissions: difference, resolve, reject, - // Reference to the related AddonInstall object (used in AMTelemetry to - // link the recorded event to the other events from the same install flow). - install: info.install, }, }; Services.obs.notifyObservers(subject, "webextension-update-permissions"); @@ -1758,9 +1736,6 @@ var AddonManagerInternal = { * An optional element for download permissions prompts. * @param {nsIPrincipal} [aOptions.triggeringPrincipal] * The principal which is attempting to install the add-on. - * @param {Object} [aOptions.telemetryInfo] - * An optional object which provides details about the installation source - * included in the addon manager telemetry events. * @throws if aUrl is not specified or if an optional argument of * an improper type is passed. */ @@ -1842,12 +1817,9 @@ var AddonManagerInternal = { * The nsIFile where the add-on is located * @param aMimetype * An optional mimetype hint for the add-on - * @param aTelemetryInfo - * An optional object which provides details about the installation source - * included in the addon manager telemetry events. * @throws if the aFile or aCallback arguments are not specified */ - getInstallForFile(aFile, aMimetype, aTelemetryInfo) { + getInstallForFile(aFile, aMimetype) { if (!gStarted) { throw Components.Exception( "AddonManager is not initialized", @@ -1874,8 +1846,7 @@ var AddonManagerInternal = { let install = await promiseCallProvider( provider, "getInstallForFile", - aFile, - aTelemetryInfo + aFile ); if (install) { @@ -3287,11 +3258,6 @@ var AddonManagerInternal = { browser: target, triggeringPrincipal: options.triggeringPrincipal, hash: options.hash, - telemetryInfo: { - source: AddonManager.getInstallSourceFromHost(options.sourceHost), - sourceURL: options.sourceURL, - method: "amWebAPI", - }, }).then(install => { let requireConfirm = true; if ( @@ -3495,10 +3461,6 @@ var AddonManagerPrivate = { .BOOTSTRAP_REASONS; }, - recordTimestamp(name, value) { - AddonManagerInternal.recordTimestamp(name, value); - }, - _simpleMeasures: {}, recordSimpleMeasure(name, value) { this._simpleMeasures[name] = value; @@ -3527,14 +3489,6 @@ var AddonManagerPrivate = { return this._simpleMeasures; }, - getTelemetryDetails() { - return AddonManagerInternal.telemetryDetails; - }, - - setTelemetryDetails(aProvider, aDetails) { - AddonManagerInternal.telemetryDetails[aProvider] = aDetails; - }, - // Start a timer, record a simple measure of the time interval when // timer.done() is called simpleTimer(aName) { @@ -3643,7 +3597,6 @@ var AddonManager = { // telemetry events. _installHostSource: new Map([ ["addons.mozilla.org", "amo"], - ["discovery.addons.mozilla.org", "disco"], ]), // Constants for the AddonInstall.state property @@ -3927,11 +3880,10 @@ var AddonManager = { return AddonManagerInternal.getInstallForURL(aUrl, aOptions); }, - getInstallForFile(aFile, aMimetype, aTelemetryInfo) { + getInstallForFile(aFile, aMimetype) { return AddonManagerInternal.getInstallForFile( aFile, - aMimetype, - aTelemetryInfo + aMimetype ); }, @@ -4159,544 +4111,8 @@ var AddonManager = { }, }; -/** - * Listens to the AddonManager install and addon events and send telemetry events. - */ -AMTelemetry = { - telemetrySetupDone: false, - - init() { - // Enable the addonsManager telemetry event category before the AddonManager - // has completed its startup, otherwise telemetry events recorded during the - // AddonManager/XPIProvider startup will not be recorded (e.g. the telemetry - // events for the extension migrated to the private browsing permission). - Services.telemetry.setEventRecordingEnabled("addonsManager", true); - }, - - // This method is called by the AddonManager, once it has been started, so that we can - // init the telemetry event category and start listening for the events related to the - // addons installation and management. - onStartup() { - if (this.telemetrySetupDone) { - return; - } - - this.telemetrySetupDone = true; - - Services.obs.addObserver(this, "addon-install-origin-blocked"); - Services.obs.addObserver(this, "addon-install-disabled"); - Services.obs.addObserver(this, "addon-install-blocked"); - - AddonManager.addInstallListener(this); - AddonManager.addAddonListener(this); - }, - - // Observer Service notification callback. - - observe(subject, topic, data) { - switch (topic) { - case "addon-install-blocked": { - const { installs } = subject.wrappedJSObject; - this.recordInstallEvent(installs[0], { step: "site_warning" }); - break; - } - case "addon-install-origin-blocked": { - const { installs } = subject.wrappedJSObject; - this.recordInstallEvent(installs[0], { step: "site_blocked" }); - break; - } - case "addon-install-disabled": { - const { installs } = subject.wrappedJSObject; - this.recordInstallEvent(installs[0], { - step: "install_disabled_warning", - }); - break; - } - } - }, - - // AddonManager install listener callbacks. - - onNewInstall(install) { - this.recordInstallEvent(install, { step: "started" }); - }, - - onInstallCancelled(install) { - this.recordInstallEvent(install, { step: "cancelled" }); - }, - - onInstallPostponed(install) { - this.recordInstallEvent(install, { step: "postponed" }); - }, - - onInstallFailed(install) { - this.recordInstallEvent(install, { step: "failed" }); - }, - - onInstallEnded(install) { - this.recordInstallEvent(install, { step: "completed" }); - }, - - onDownloadStarted(install) { - this.recordInstallEvent(install, { step: "download_started" }); - }, - - onDownloadCancelled(install) { - this.recordInstallEvent(install, { step: "cancelled" }); - }, - - onDownloadEnded(install) { - let download_time = Math.round(Cu.now() - install.downloadStartedAt); - this.recordInstallEvent(install, { - step: "download_completed", - download_time, - }); - }, - - onDownloadFailed(install) { - let download_time = Math.round(Cu.now() - install.downloadStartedAt); - this.recordInstallEvent(install, { - step: "download_failed", - download_time, - }); - }, - - // Addon listeners callbacks. - - onUninstalled(addon) { - this.recordManageEvent(addon, "uninstall"); - }, - - onEnabled(addon) { - this.recordManageEvent(addon, "enable"); - }, - - onDisabled(addon) { - this.recordManageEvent(addon, "disable"); - }, - - // Internal helpers methods. - - /** - * Get a trimmed version of the given string if it is longer than 80 chars. - * - * @param {string} str - * The original string content. - * - * @returns {string} - * The trimmed version of the string when longer than 80 chars, or the given string - * unmodified otherwise. - */ - getTrimmedString(str) { - if (str.length <= 80) { - return str; - } - - const length = str.length; - - // Trim the string to prevent a flood of warnings messages logged internally by recordEvent, - // the trimmed version is going to be composed by the first 40 chars and the last 37 and 3 dots - // that joins the two parts, to visually indicate that the string has been trimmed. - return `${str.slice(0, 40)}...${str.slice(length - 37, length)}`; - }, - - /** - * Retrieve the addonId for the given AddonInstall instance. - * - * @param {AddonInstall} install - * The AddonInstall instance to retrieve the addonId from. - * - * @returns {string | null} - * The addonId for the given AddonInstall instance (if any). - */ - getAddonIdFromInstall(install) { - // Returns the id of the extension that is being installed, as soon as the - // addon is available in the AddonInstall instance (after being downloaded - // and validated successfully). - if (install.addon) { - return install.addon.id; - } - - // While updating an addon, the existing addon can be - // used to retrieve the addon id since the first update event. - if (install.existingAddon) { - return install.existingAddon.id; - } - - return null; - }, - - /** - * Retrieve the telemetry event's object property value for the given - * AddonInstall instance. - * - * @param {AddonInstall} install - * The AddonInstall instance to retrieve the event object from. - * - * @returns {string} - * The object for the given AddonInstall instance. - */ - getEventObjectFromInstall(install) { - let addonType; - - if (install.type) { - // The AddonInstall wrapper already provides a type (if it was known when the - // install object has been created). - addonType = install.type; - } else if (install.addon) { - // The install flow has reached a step that has an addon instance which we can - // check to know the extension type (e.g. after download for the DownloadAddonInstall). - addonType = install.addon.type; - } else if (install.existingAddon) { - // The install flow is an update and we can look the existingAddon to check which was - // the add-on type that is being installed. - addonType = install.existingAddon.type; - } - - return this.getEventObjectFromAddonType(addonType); - }, - - /** - * Retrieve the telemetry event source for the given AddonInstall instance. - * - * @param {AddonInstall} install - * The AddonInstall instance to retrieve the source from. - * - * @returns {Object | null} - * The telemetry infor ({source, method}) from the given AddonInstall instance. - */ - getInstallTelemetryInfo(install) { - if (install.installTelemetryInfo) { - return install.installTelemetryInfo; - } else if ( - install.existingAddon && - install.existingAddon.installTelemetryInfo - ) { - // Get the install source from the existing addon (e.g. for an extension update). - return install.existingAddon.installTelemetryInfo; - } - - return null; - }, - - /** - * Get the telemetry event's object property for the given addon type - * - * @param {string} addonType - * The addon type to convert into the related telemetry event object. - * - * @returns {string} - * The object for the given addon type. - */ - getEventObjectFromAddonType(addonType) { - switch (addonType) { - case undefined: - return "unknown"; - case "extension": - case "theme": - case "locale": - case "dictionary": - return addonType; - default: - // Currently this should only include plugins and gmp-plugins - return "other"; - } - }, - - convertToString(value) { - if (value == null) { - // Convert null and undefined to empty strings. - return ""; - } - switch (typeof value) { - case "string": - return value; - case "boolean": - return value ? "1" : "0"; - } - return String(value); - }, - - /** - * Convert all the telemetry event's extra_vars into strings, if needed. - * - * @param {object} extraVars - * @returns {object} The formatted extra vars. - */ - formatExtraVars({ addon, ...extraVars }) { - if (addon) { - extraVars.addonId = addon.id; - extraVars.type = addon.type; - } - - // All the extra_vars in a telemetry event have to be strings. - for (var [key, value] of Object.entries(extraVars)) { - if (value == undefined) { - delete extraVars[key]; - } else { - extraVars[key] = this.convertToString(value); - } - } - - if (extraVars.addonId) { - extraVars.addonId = this.getTrimmedString(extraVars.addonId); - } - - return extraVars; - }, - - /** - * Record an install or update event for the given AddonInstall instance. - * - * @param {AddonInstall} install - * The AddonInstall instance to record an install or update event for. - * @param {object} extraVars - * The additional extra_vars to include in the recorded event. - * @param {string} extraVars.step - * The current step in the install or update flow. - * @param {string} extraVars.download_time - * The number of ms needed to download the extension. - * @param {string} extraVars.num_strings - * The number of permission description string for the extension - * permission doorhanger. - */ - recordInstallEvent(install, extraVars) { - // Early exit if AMTelemetry's telemetry setup has not been done yet. - if (!this.telemetrySetupDone) { - return; - } - - let extra = {}; - - let telemetryInfo = this.getInstallTelemetryInfo(install); - if (telemetryInfo && typeof telemetryInfo.source === "string") { - extra.source = telemetryInfo.source; - } - - if (extra.source === "internal") { - // Do not record the telemetry event for installation sources - // that are marked as "internal". - return; - } - - // Also include the install source's method when applicable (e.g. install events with - // source "about:addons" may have "install-from-file" or "url" as their source method). - if (telemetryInfo && typeof telemetryInfo.method === "string") { - extra.method = telemetryInfo.method; - } - - let addonId = this.getAddonIdFromInstall(install); - let object = this.getEventObjectFromInstall(install); - - let installId = String(install.installId); - let eventMethod = install.existingAddon ? "update" : "install"; - - if (addonId) { - extra.addon_id = this.getTrimmedString(addonId); - } - - if (install.error) { - extra.error = AddonManager.errorToString(install.error); - } - - if (eventMethod === "update") { - // For "update" telemetry events, also include an extra var which determine - // if the update has been requested by the user. - extra.updated_from = install.isUserRequestedUpdate ? "user" : "app"; - } - - // All the extra vars in a telemetry event have to be strings. - extra = this.formatExtraVars({ ...extraVars, ...extra }); - - this.recordEvent({ method: eventMethod, object, value: installId, extra }); - }, - - /** - * Record a manage event for the given addon. - * - * @param {AddonWrapper} addon - * The AddonWrapper instance. - * @param {object} extraVars - * The additional extra_vars to include in the recorded event. - * @param {string} extraVars.num_strings - * The number of permission description string for the extension - * permission doorhanger. - */ - recordManageEvent(addon, method, extraVars) { - // Early exit if AMTelemetry's telemetry setup has not been done yet. - if (!this.telemetrySetupDone) { - return; - } - - let extra = {}; - - if (addon.installTelemetryInfo) { - if ("source" in addon.installTelemetryInfo) { - extra.source = addon.installTelemetryInfo.source; - } - - // Also include the install source's method when applicable (e.g. install events with - // source "about:addons" may have "install-from-file" or "url" as their source method). - if ("method" in addon.installTelemetryInfo) { - extra.method = addon.installTelemetryInfo.method; - } - } - - if (extra.source === "internal") { - // Do not record the telemetry event for installation sources - // that are marked as "internal". - return; - } - - let object = this.getEventObjectFromAddonType(addon.type); - let value = this.getTrimmedString(addon.id); - - extra = { ...extraVars, ...extra }; - - let hasExtraVars = Object.keys(extra).length > 0; - extra = this.formatExtraVars(extra); - - this.recordEvent({ - method, - object, - value, - extra: hasExtraVars ? extra : null, - }); - }, - - /** - * Record an event for when a link is clicked. - * - * @param {object} opts - * @param {string} opts.object - * The object of the event, should be an identifier for where the link - * is located. The accepted values are listed in the - * addonsManager.link object of the Events.yaml file. - * @param {string} opts.value The identifier for the link destination. - * @param {object} opts.extra - * The extra data to be sent, all keys must be registered in the - * extra_keys section of addonsManager.link in Events.yaml. - */ - recordLinkEvent({ object, value, extra = null }) { - this.recordEvent({ method: "link", object, value, extra }); - }, - - /** - * Record an event for an action that took place. - * - * @param {object} opts - * @param {string} opts.object - * The object of the event, should an identifier for where the action - * took place. The accepted values are listed in the - * addonsManager.action object of the Events.yaml file. - * @param {string} opts.action The identifier for the action. - * @param {string} opts.value An optional value for the action. - * @param {object} opts.addon - * An optional object with the "id" and "type" properties, for example - * an AddonWrapper object. Passing this will set some extra properties. - * @param {string} opts.addon.id - * The add-on ID to assign to extra.addonId. - * @param {string} opts.addon.type - * The add-on type to assign to extra.type. - * @param {string} opts.view The current view, when object is aboutAddons. - * @param {object} opts.extra - * The extra data to be sent, all keys must be registered in the - * extra_keys section of addonsManager.action in Events.yaml. If - * opts.addon is passed then it will overwrite the addonId and type - * properties in this object, if they are set. - */ - recordActionEvent({ object, action, value, addon, view, extra }) { - extra = { ...extra, action, addon, view }; - this.recordEvent({ - method: "action", - object, - // Treat null and undefined as null. - value: value == null ? null : this.convertToString(value), - extra: this.formatExtraVars(extra), - }); - }, - - /** - * Record an event for a view load in about:addons. - * - * @param {object} opts - * @param {string} opts.view - * The identifier for the view. The accepted values are listed in the - * object property of addonsManager.view object of the Events.yaml - * file. - * @param {AddonWrapper} opts.addon - * An optional add-on object related to the event. - * @param {string} opts.type - * An optional type for the view. If opts.addon is set it will - * overwrite this value with the type of the add-on. - */ - recordViewEvent({ view, addon, type }) { - this.recordEvent({ - method: "view", - object: "aboutAddons", - value: view, - extra: this.formatExtraVars({ type, addon }), - }); - }, - - /** - * Record an event on abuse report submissions. - * - * @params {object} opts - * @params {string} opts.addonId - * The id of the addon being reported. - * @params {string} [opts.addonType] - * The type of the addon being reported (only present for an existing - * addonId). - * @params {string} [opts.errorType] - * The AbuseReport errorType for a submission failure. - * @params {string} opts.reportEntryPoint - * The entry point of the abuse report. - */ - recordReportEvent({ addonId, addonType, errorType, reportEntryPoint }) { - this.recordEvent({ - method: "report", - object: reportEntryPoint, - value: addonId, - extra: this.formatExtraVars({ - addon_type: addonType, - error_type: errorType, - }), - }); - }, - - recordEvent({ method, object, value, extra }) { - if (typeof value != "string") { - // The value must be a string or null, make sure it's valid so sending - // the event doesn't fail. - value = null; - } - try { - Services.telemetry.recordEvent( - "addonsManager", - method, - object, - value, - extra - ); - } catch (err) { - // If the telemetry throws just log the error so it doesn't break any - // functionality. - Cu.reportError(err); - } - }, -}; - this.AddonManager.init(); -// Setup the AMTelemetry once the AddonManager has been started. -this.AddonManager.addManagerListener(AMTelemetry); - -// load the timestamps module into AddonManagerInternal -ChromeUtils.import( - "resource://gre/modules/TelemetryTimestamps.jsm", - AddonManagerInternal -); Object.freeze(AddonManagerInternal); Object.freeze(AddonManagerPrivate); Object.freeze(AddonManager); diff --git a/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp b/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp index 252caa3291..3ce8faa7c6 100644 --- a/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp +++ b/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp @@ -27,17 +27,14 @@ static bool IsValidHost(const nsACString& host) { return false; } - if (host.EqualsLiteral("addons.mozilla.org") || - host.EqualsLiteral("discovery.addons.mozilla.org")) { + if (host.EqualsLiteral("addons.mozilla.org")) { return true; } // When testing allow access to the developer sites. if (Preferences::GetBool("extensions.webapi.testing", false)) { if (host.LowerCaseEqualsLiteral("addons.allizom.org") || - host.LowerCaseEqualsLiteral("discovery.addons.allizom.org") || host.LowerCaseEqualsLiteral("addons-dev.allizom.org") || - host.LowerCaseEqualsLiteral("discovery.addons-dev.allizom.org") || host.LowerCaseEqualsLiteral("example.com")) { return true; } diff --git a/toolkit/mozapps/extensions/addonManager.js b/toolkit/mozapps/extensions/addonManager.js index 5b0adafd80..dc4d04120a 100644 --- a/toolkit/mozapps/extensions/addonManager.js +++ b/toolkit/mozapps/extensions/addonManager.js @@ -87,22 +87,12 @@ amManager.prototype = { retval = false; } - let telemetryInfo = { - source: AddonManager.getInstallSourceFromHost(aPayload.sourceHost), - sourceURL: aPayload.sourceURL, - }; - - if ("method" in aPayload) { - telemetryInfo.method = aPayload.method; - } - AddonManager.getInstallForURL(uri, { hash, name, icon, browser: aBrowser, triggeringPrincipal, - telemetryInfo, sendCookies: true, }).then(aInstall => { function callCallback(status) { diff --git a/toolkit/mozapps/extensions/content/aboutaddons.css b/toolkit/mozapps/extensions/content/aboutaddons.css index dd6515541d..96c825155d 100644 --- a/toolkit/mozapps/extensions/content/aboutaddons.css +++ b/toolkit/mozapps/extensions/content/aboutaddons.css @@ -17,11 +17,6 @@ max-width: var(--section-width); } -#abuse-reports-messages { - margin-inline-start: 28px; - max-width: var(--section-width); -} - /* The margin between message bars. */ message-bar-stack > * { margin-bottom: 8px; @@ -247,14 +242,6 @@ addon-details { margin: 0; } -.addon-detail-rating { - display: flex; -} - -.addon-detail-rating > a { - margin-inline-start: 8px; -} - .more-options-button { min-width: auto; min-height: auto; diff --git a/toolkit/mozapps/extensions/content/aboutaddons.html b/toolkit/mozapps/extensions/content/aboutaddons.html index 6254d81b1a..e787454c51 100644 --- a/toolkit/mozapps/extensions/content/aboutaddons.html +++ b/toolkit/mozapps/extensions/content/aboutaddons.html @@ -9,18 +9,13 @@ - - - - -
@@ -81,26 +76,6 @@ - - - - - -