Bug 1378136 - Redirect user to the general pane for search settings on old preferences page. r=jaws, a=jcristau
authorTimothy Guan-tin Chien <timdream@gmail.com>
Mon, 10 Jul 2017 17:01:41 +0800
changeset 414359 cbaff692f6fef2ded5e861d652d8e6edacad1eef
parent 414358 45afa550d6cc52effd06f7c42ca99d2ea68bcfa1
child 414360 fe847bf98f6ad35e96f98a218741a7bdcffe0ebd
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, jcristau
bugs1378136
milestone55.0
Bug 1378136 - Redirect user to the general pane for search settings on old preferences page. r=jaws, a=jcristau MozReview-Commit-ID: Akb4yDPhWTF
browser/modules/ContentSearch.jsm
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -408,17 +408,22 @@ this.ContentSearch = {
   },
 
   _onMessageSetCurrentEngine(msg, data) {
     Services.search.currentEngine = Services.search.getEngineByName(data);
   },
 
   _onMessageManageEngines(msg, data) {
     let browserWin = msg.target.ownerGlobal;
-    browserWin.openPreferences("paneGeneral", {origin: "contentSearch"});
+    let pref = Services.prefs.getBoolPref("browser.preferences.useOldOrganization");
+    if (pref) {
+      browserWin.openPreferences("paneSearch", {origin: "contentSearch"});
+    } else {
+      browserWin.openPreferences("general-search", {origin: "contentSearch"});
+    }
   },
 
   async _onMessageGetSuggestions(msg, data) {
     this._ensureDataHasProperties(data, [
       "engineName",
       "searchString",
     ]);
     let {engineName, searchString} = data;