From 56edefa8731714be736f8c670335fa190b820594 Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Wed, 24 Jun 2015 14:09:59 -0700 Subject: [PATCH] Bug 1176205: Disable search suggestions by default and hide the UI on non-nightly builds. r=adw, r=mak --HG-- extra : commitid : 8hJgI1Cizvt extra : rebase_source : b248a1013c6d6a8b271111cf820ad125ba7969b1 extra : source : 257dc5010bad8257c3da5da41279ad2c3b06f3a3 --- browser/app/profile/firefox.js | 4 ++++ .../preferences/in-content/privacy.js | 4 ++++ .../preferences/in-content/privacy.xul | 1 + .../in-content/tests/browser_privacypane_1.js | 3 --- .../in-content/tests/browser_privacypane_3.js | 3 --- .../in-content/tests/browser_privacypane_4.js | 3 --- .../in-content/tests/browser_privacypane_5.js | 11 ++++++----- .../in-content/tests/browser_privacypane_8.js | 3 --- .../tests/privacypane_tests_perwindow.js | 15 +++++++++++---- browser/components/preferences/privacy.js | 3 +++ browser/components/preferences/privacy.xul | 1 + .../preferences/tests/browser_privacypane_1.js | 3 --- .../preferences/tests/browser_privacypane_3.js | 3 --- .../preferences/tests/browser_privacypane_4.js | 3 --- .../preferences/tests/browser_privacypane_5.js | 11 ++++++----- .../preferences/tests/browser_privacypane_8.js | 3 --- .../tests/privacypane_tests_perwindow.js | 17 ++++++++++++----- 17 files changed, 48 insertions(+), 43 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 1fab15275b93..421527bcaf49 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -348,7 +348,11 @@ pref("browser.urlbar.match.url", "@"); pref("browser.urlbar.suggest.history", true); pref("browser.urlbar.suggest.bookmark", true); pref("browser.urlbar.suggest.openpage", true); +#ifdef NIGHTLY_BUILD pref("browser.urlbar.suggest.searches", true); +#else +pref("browser.urlbar.suggest.searches", false); +#endif // Restrictions to current suggestions can also be applied (intersection). // Typed suggestion works only if history is set to true. diff --git a/browser/components/preferences/in-content/privacy.js b/browser/components/preferences/in-content/privacy.js index c498c7ca5ab3..ce6e81267457 100644 --- a/browser/components/preferences/in-content/privacy.js +++ b/browser/components/preferences/in-content/privacy.js @@ -2,6 +2,8 @@ * 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/. */ +Components.utils.import("resource://gre/modules/AppConstants.jsm"); + var gPrivacyPane = { /** @@ -103,6 +105,8 @@ var gPrivacyPane = { gPrivacyPane.showCookies); setEventListener("clearDataSettings", "command", gPrivacyPane.showClearPrivateDataSettings); + + document.getElementById("searchesSuggestion").hidden = !AppConstants.NIGHTLY_BUILD; }, // HISTORY MODE diff --git a/browser/components/preferences/in-content/privacy.xul b/browser/components/preferences/in-content/privacy.xul index 557c1d8b7365..e95f085ead82 100644 --- a/browser/components/preferences/in-content/privacy.xul +++ b/browser/components/preferences/in-content/privacy.xul @@ -258,6 +258,7 @@ accesskey="&locbar.openpage.accesskey;" preference="browser.urlbar.suggest.openpage"/>