Bug 1477670 - remove web feed handling prefs and tidy up user-set prefs if they exist, r?jkt,flod
MozReview-Commit-ID: 46wdeAY3wOi
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -736,36 +736,16 @@ pref("browser.backspace_action", 0);
// editable elements in HTML
// 0 = spellcheck nothing
// 1 = check multi-line controls [default]
// 2 = check multi/single line controls
pref("layout.spellcheckDefault", 1);
pref("browser.send_pings", false);
-/* initial web feed readers list */
-pref("browser.contentHandlers.types.0.title", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.0.uri", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.0.type", "application/vnd.mozilla.maybe.feed");
-pref("browser.contentHandlers.types.1.title", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.1.uri", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.1.type", "application/vnd.mozilla.maybe.feed");
-pref("browser.contentHandlers.types.2.title", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.2.uri", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.2.type", "application/vnd.mozilla.maybe.feed");
-pref("browser.contentHandlers.types.3.title", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.3.uri", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.3.type", "application/vnd.mozilla.maybe.feed");
-pref("browser.contentHandlers.types.4.title", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.4.uri", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.4.type", "application/vnd.mozilla.maybe.feed");
-pref("browser.contentHandlers.types.5.title", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.5.uri", "chrome://browser-region/locale/region.properties");
-pref("browser.contentHandlers.types.5.type", "application/vnd.mozilla.maybe.feed");
-
pref("browser.feeds.handler", "ask");
pref("browser.videoFeeds.handler", "ask");
pref("browser.audioFeeds.handler", "ask");
// At startup, if the handler service notices that the version number in the
// region.properties file is newer than the version number in the handler
// service datastore, it will add any new handlers it finds in the prefs (as
// seeded by this file) to its datastore.
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1806,17 +1806,17 @@ BrowserGlue.prototype = {
}
}
},
// eslint-disable-next-line complexity
_migrateUI: function BG__migrateUI() {
// Use an increasing number to keep track of the current migration state.
// Completely unrelated to the current Firefox release number.
- const UI_VERSION = 70;
+ const UI_VERSION = 71;
const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL;
let currentUIVersion;
if (Services.prefs.prefHasUserValue("browser.migration.version")) {
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
} else {
// This is a new profile, nothing to migrate.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -2129,16 +2129,24 @@ BrowserGlue.prototype = {
Services.prefs.setBoolPref("browser.ctrlTab.recentlyUsedOrder",
Services.prefs.getBoolPref("browser.ctrlTab.previews", false));
Services.prefs.clearUserPref("browser.ctrlTab.previews");
// Remember that we migrated the pref in case we decide to flip it for
// these users.
Services.prefs.setBoolPref("browser.ctrlTab.migrated", true);
}
+ if (currentUIVersion < 71) {
+ // Clear legacy saved prefs for content handlers.
+ let savedContentHandlers = Services.prefs.getChildList("browser.contentHandlers.types");
+ for (let savedHandlerPref of savedContentHandlers) {
+ Services.prefs.clearUserPref(savedHandlerPref);
+ }
+ }
+
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
_checkForDefaultBrowser() {
// Perform default browser checking.
if (!ShellService) {
return;
--- a/browser/locales/en-US/chrome/browser-region/region.properties
+++ b/browser/locales/en-US/chrome/browser-region/region.properties
@@ -1,17 +1,12 @@
# 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/.
-# This is the default set of web based feed handlers shown in the reader
-# selection UI
-browser.contentHandlers.types.0.title=My Yahoo!
-browser.contentHandlers.types.0.uri=https://add.my.yahoo.com/rss?url=%s
-
# increment this number when anything gets changed in the list below. This will
# cause Firefox to re-read these prefs and inject any new handlers into the
# profile database. Note that "new" is defined as "has a different URL"; this
# means that it's not possible to update the name of existing handler, so
# don't make any spelling errors here.
gecko.handlerService.defaultHandlersVersion=4
# The default set of protocol handlers for webcal: