From e552f54072653c6f38ace5480be797c1bd7bdc1b Mon Sep 17 00:00:00 2001 From: Mike Conley Date: Mon, 5 Feb 2024 22:03:14 +0000 Subject: [PATCH] Bug 1877196 - Move InfoBar.sys.mjs to browser/components/asrouter. r=pdahiya,omc-reviewers Differential Revision: https://phabricator.services.mozilla.com/D200084 --- browser/components/asrouter/modules/ASRouter.jsm | 2 +- .../components/{newtab/lib => asrouter/modules}/InfoBar.sys.mjs | 0 browser/components/asrouter/moz.build | 1 + .../messagepreview/actors/AboutMessagePreviewParent.sys.mjs | 2 +- .../components/newtab/test/browser/browser_asrouter_infobar.js | 2 +- tools/esmify/map.json | 2 +- 6 files changed, 5 insertions(+), 4 deletions(-) rename browser/components/{newtab/lib => asrouter/modules}/InfoBar.sys.mjs (100%) diff --git a/browser/components/asrouter/modules/ASRouter.jsm b/browser/components/asrouter/modules/ASRouter.jsm index f923967eeb1e..bcfa5947d6d5 100644 --- a/browser/components/asrouter/modules/ASRouter.jsm +++ b/browser/components/asrouter/modules/ASRouter.jsm @@ -17,7 +17,7 @@ ChromeUtils.defineESModuleGetters(lazy, { ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs", FeatureCalloutBroker: "resource://activity-stream/lib/FeatureCalloutBroker.sys.mjs", - InfoBar: "resource://activity-stream/lib/InfoBar.sys.mjs", + InfoBar: "resource:///modules/asrouter/InfoBar.sys.mjs", KintoHttpClient: "resource://services-common/kinto-http-client.sys.mjs", MacAttribution: "resource:///modules/MacAttribution.sys.mjs", MomentsPageHub: "resource:///modules/asrouter/MomentsPageHub.sys.mjs", diff --git a/browser/components/newtab/lib/InfoBar.sys.mjs b/browser/components/asrouter/modules/InfoBar.sys.mjs similarity index 100% rename from browser/components/newtab/lib/InfoBar.sys.mjs rename to browser/components/asrouter/modules/InfoBar.sys.mjs diff --git a/browser/components/asrouter/moz.build b/browser/components/asrouter/moz.build index d6fef4626833..c8917d6e62a5 100644 --- a/browser/components/asrouter/moz.build +++ b/browser/components/asrouter/moz.build @@ -24,6 +24,7 @@ EXTRA_JS_MODULES.asrouter += [ "modules/ASRouterTriggerListeners.jsm", "modules/CFRMessageProvider.sys.mjs", "modules/CFRPageActions.jsm", + "modules/InfoBar.sys.mjs", "modules/MessagingExperimentConstants.sys.mjs", "modules/MomentsPageHub.sys.mjs", "modules/OnboardingMessageProvider.jsm", diff --git a/browser/components/messagepreview/actors/AboutMessagePreviewParent.sys.mjs b/browser/components/messagepreview/actors/AboutMessagePreviewParent.sys.mjs index cf1186280f36..fd4ffc88be62 100644 --- a/browser/components/messagepreview/actors/AboutMessagePreviewParent.sys.mjs +++ b/browser/components/messagepreview/actors/AboutMessagePreviewParent.sys.mjs @@ -11,7 +11,7 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { FeatureCalloutBroker: "resource://activity-stream/lib/FeatureCalloutBroker.sys.mjs", - InfoBar: "resource://activity-stream/lib/InfoBar.sys.mjs", + InfoBar: "resource:///modules/asrouter/InfoBar.sys.mjs", SpecialMessageActions: "resource://messaging-system/lib/SpecialMessageActions.sys.mjs", Spotlight: "resource:///modules/asrouter/Spotlight.sys.mjs", diff --git a/browser/components/newtab/test/browser/browser_asrouter_infobar.js b/browser/components/newtab/test/browser/browser_asrouter_infobar.js index 21aa9cf80537..8e564131393c 100644 --- a/browser/components/newtab/test/browser/browser_asrouter_infobar.js +++ b/browser/components/newtab/test/browser/browser_asrouter_infobar.js @@ -4,7 +4,7 @@ "use strict"; const { InfoBar } = ChromeUtils.importESModule( - "resource://activity-stream/lib/InfoBar.sys.mjs" + "resource:///modules/asrouter/InfoBar.sys.mjs" ); const { CFRMessageProvider } = ChromeUtils.importESModule( "resource:///modules/asrouter/CFRMessageProvider.sys.mjs" diff --git a/tools/esmify/map.json b/tools/esmify/map.json index 848010b6bfa2..14491bdb0799 100644 --- a/tools/esmify/map.json +++ b/tools/esmify/map.json @@ -247,6 +247,7 @@ "resource:///modules/asrouter/ASRouterTargeting.jsm": "browser/components/asrouter/modules/ASRouterTargeting.jsm", "resource:///modules/asrouter/ASRouterTriggerListeners.jsm": "browser/components/asrouter/modules/ASRouterTriggerListeners.jsm", "resource:///modules/asrouter/CFRPageActions.jsm": "browser/components/asrouter/modules/CFRPageActions.jsm", + "resource:///modules/asrouter/InfoBar.jsm": "browser/components/asrouter/modules/InfoBar.jsm", "resource:///modules/asrouter/MomentsPageHub.jsm": "browser/components/asrouter/modules/MomentsPageHub.jsm", "resource:///modules/asrouter/OnboardingMessageProvider.jsm": "browser/components/asrouter/modules/OnboardingMessageProvider.jsm", "resource:///modules/asrouter/ToolbarBadgeHub.jsm": "browser/components/asrouter/modules/ToolbarBadgeHub.jsm", @@ -306,7 +307,6 @@ "resource://activity-stream/lib/FaviconFeed.jsm": "browser/components/newtab/lib/FaviconFeed.jsm", "resource://activity-stream/lib/FeatureCalloutMessages.jsm": "browser/components/newtab/lib/FeatureCalloutMessages.jsm", "resource://activity-stream/lib/FilterAdult.jsm": "browser/components/newtab/lib/FilterAdult.jsm", - "resource://activity-stream/lib/InfoBar.jsm": "browser/components/newtab/lib/InfoBar.jsm", "resource://activity-stream/lib/LinksCache.jsm": "browser/components/newtab/lib/LinksCache.jsm", "resource://activity-stream/lib/NewTabInit.jsm": "browser/components/newtab/lib/NewTabInit.jsm", "resource://activity-stream/lib/PanelTestProvider.jsm": "browser/components/newtab/lib/PanelTestProvider.jsm",