Bug 1521725 - Remove remaining about:searchreset references. r=Gijs
authorDale Harvey <dale@arandomurl.com>
Sun, 17 Mar 2019 13:03:52 +0000
changeset 522604 7444d00f6a08
parent 522603 f16aa91c7d4c
child 522605 d8ead6a3396d
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1521725
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1521725 - Remove remaining about:searchreset references. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D17563
browser/components/about/components.conf
modules/libpref/init/all.js
toolkit/components/search/SearchService.jsm
--- a/browser/components/about/components.conf
+++ b/browser/components/about/components.conf
@@ -16,17 +16,16 @@ pages = [
     'pocket-signup',
     'policies',
     'preferences',
     'privatebrowsing',
     'reader',
     'restartrequired',
     'rights',
     'robots',
-    'searchreset',
     'sessionrestore',
     'tabcrashed',
     'welcome',
     'welcomeback',
 ]
 
 if defined('NIGHTLY_BUILD'):
     pages.append('config')
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2691,17 +2691,17 @@ pref("font.blacklist.underline_offset", 
 
 pref("security.directory",              "");
 
 // security-sensitive dialogs should delay button enabling. In milliseconds.
 pref("security.dialog_enable_delay", 1000);
 pref("security.notification_enable_delay", 500);
 
 #if defined(DEBUG) && !defined(ANDROID)
-pref("csp.about_uris_without_csp", "blank,printpreview,srcdoc,about,addons,cache-entry,config,crashes,debugging,devtools,downloads,home,memory,networking,newtab,performance,plugins,policies,profiles,restartrequired,searchreset,serviceworkers,sessionrestore,support,sync-log,telemetry,url-classifier,webrtc,welcomeback");
+pref("csp.about_uris_without_csp", "blank,printpreview,srcdoc,about,addons,cache-entry,config,crashes,debugging,devtools,downloads,home,memory,networking,newtab,performance,plugins,policies,profiles,restartrequired,serviceworkers,sessionrestore,support,sync-log,telemetry,url-classifier,webrtc,welcomeback");
 // the following prefs are for testing purposes only.
 pref("csp.overrule_about_uris_without_csp_whitelist", false);
 pref("csp.skip_about_page_has_csp_assert", false);
 // assertion flag will be set to false after fixing Bug 1473549
 pref("security.allow_eval_with_system_principal", false);
 pref("security.uris_using_eval_with_system_principal", "autocomplete.xml,redux.js,react-redux.js,content-task.js,content-task.js,tree.xml,dialog.xml,preferencesbindings.js,wizard.xml,lodash.js,jszip.js,sinon-7.2.7.js,ajv-4.1.1.js,updates.js,setup,jsol.js,parent_utils.js,chrometask_chromescript");
 #endif
 
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -18,21 +18,17 @@ XPCOMUtils.defineLazyModuleGetters(this,
 
 XPCOMUtils.defineLazyServiceGetters(this, {
   gEnvironment: ["@mozilla.org/process/environment;1", "nsIEnvironment"],
   gChromeReg: ["@mozilla.org/chrome/chrome-registry;1", "nsIChromeRegistry"],
 });
 
 const BROWSER_SEARCH_PREF = "browser.search.";
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "resetStatus", BROWSER_SEARCH_PREF + "reset.status", "");
 XPCOMUtils.defineLazyPreferenceGetter(this, "loggingEnabled", BROWSER_SEARCH_PREF + "log", false);
-XPCOMUtils.defineLazyGetter(this, "resetEnabled", () => {
-  return Services.prefs.getDefaultBranch(BROWSER_SEARCH_PREF).getBoolPref("reset.enabled");
-});
 // Can't use defineLazyPreferenceGetter because we want the value
 // from the default branch
 XPCOMUtils.defineLazyGetter(this, "distroID", () => {
   return Services.prefs.getDefaultBranch("distribution.").getCharPref("id", "");
 });
 
 const BinaryInputStream = Components.Constructor(
   "@mozilla.org/binaryinputstream;1",
@@ -2320,37 +2316,16 @@ Engine.prototype = {
 
   // from nsISearchEngine
   getSubmission: function SRCH_ENG_getSubmission(aData, aResponseType, aPurpose) {
     if (!aResponseType) {
       aResponseType = AppConstants.platform == "android" ? this._defaultMobileResponseType :
                                                            URLTYPE_SEARCH_HTML;
     }
 
-    let resetPending;
-    if (aResponseType == URLTYPE_SEARCH_HTML &&
-        ((resetPending = resetStatus == "pending") ||
-         resetEnabled) &&
-        this.name == Services.search.defaultEngine.name &&
-        !this._isDefault &&
-        this.name != Services.search.originalDefaultEngine.name &&
-        (resetPending || !this.getAttr("loadPathHash") ||
-         this.getAttr("loadPathHash") != getVerificationHash(this._loadPath)) &&
-        !this._isWhiteListed) {
-      let url = "about:searchreset";
-      let data = [];
-      if (aData)
-        data.push("data=" + encodeURIComponent(aData));
-      if (aPurpose)
-        data.push("purpose=" + aPurpose);
-      if (data.length)
-        url += "?" + data.join("&");
-      return new Submission(makeURI(url));
-    }
-
     var url = this._getURLOfType(aResponseType);
 
     if (!url)
       return null;
 
     if (!aData) {
       // Return a dummy submission object with our searchForm attribute
       return new Submission(makeURI(this._getSearchFormWithPurpose(aPurpose)));