mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1495517 - Migrate improvesearch.topSiteSearchShortcuts pref from ActivityStream.jsm to firefox.js r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D7325 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
b55a01a61c
commit
3c481420de
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user