diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 05f42c9f3ff0..5ff5ef67724c 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1251,6 +1251,14 @@ pref("browser.library.activity-stream.enabled", true); // The remote FxA root content URL for the Activity Stream firstrun page. pref("browser.newtabpage.activity-stream.fxaccounts.endpoint", "https://accounts.firefox.com/"); +// The pref that controls if the search shortcuts experiment is on +#ifdef EARLY_BETA_OR_EARLIER +pref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts", true); +#else +pref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts", false); +#else +#endif + // Enable the DOM fullscreen API. pref("full-screen-api.enabled", true); diff --git a/browser/components/newtab/lib/ActivityStream.jsm b/browser/components/newtab/lib/ActivityStream.jsm index 11ebe0161c74..8dffb5b718be 100644 --- a/browser/components/newtab/lib/ActivityStream.jsm +++ b/browser/components/newtab/lib/ActivityStream.jsm @@ -167,10 +167,6 @@ const PREFS_CONFIG = new Map([ title: "Experiment to remove tiles that are the same as the default search", value: true, }], - ["improvesearch.topSiteSearchShortcuts", { - title: "Experiment to show special top sites that perform keyword searches", - value: UpdateUtils.getUpdateChannel(true) !== "release", - }], ["improvesearch.topSiteSearchShortcuts.searchEngines", { title: "An ordered, comma-delimited list of search shortcuts that we should try and pin", // This pref is dynamic as the shortcuts vary depending on the region diff --git a/browser/components/newtab/lib/PrefsFeed.jsm b/browser/components/newtab/lib/PrefsFeed.jsm index 640fd9dc61c4..06ce30b08ce4 100644 --- a/browser/components/newtab/lib/PrefsFeed.jsm +++ b/browser/components/newtab/lib/PrefsFeed.jsm @@ -105,6 +105,13 @@ this.PrefsFeed = class PrefsFeed { values.fxa_endpoint = Services.prefs.getStringPref( "browser.newtabpage.activity-stream.fxaccounts.endpoint", "https://accounts.firefox.com"); + // Read the pref for search shortcuts top sites experiment from firefox.js and store it + // in our interal list of prefs to watch + let searchTopSiteExperimentPrefValue = Services.prefs.getBoolPref( + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts"); + values["improvesearch.topSiteSearchShortcuts"] = searchTopSiteExperimentPrefValue; + this._prefMap.set("improvesearch.topSiteSearchShortcuts", searchTopSiteExperimentPrefValue); + // Set the initial state of all prefs in redux this.store.dispatch(ac.BroadcastToContent({type: at.PREFS_INITIAL_VALUES, data: values}));