Skip to content

Commit 5736aa0

Browse files
committed
Bug 1846787 - let shopping code ride the train (disabled by default), r=jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D187779
1 parent f8cb048 commit 5736aa0

File tree

10 files changed

+8
-41
lines changed

10 files changed

+8
-41
lines changed

browser/base/content/browser.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,9 +2052,7 @@ var gBrowserInit = {
20522052

20532053
CaptivePortalWatcher.delayedStartup();
20542054

2055-
if (AppConstants.NIGHTLY_BUILD) {
2056-
ShoppingSidebarManager.init();
2057-
}
2055+
ShoppingSidebarManager.init();
20582056

20592057
SessionStore.promiseAllWindowsRestored.then(() => {
20602058
this._schedulePerWindowIdleTasks();
@@ -2475,9 +2473,7 @@ var gBrowserInit = {
24752473

24762474
FirefoxViewHandler.uninit();
24772475

2478-
if (AppConstants.NIGHTLY_BUILD) {
2479-
ShoppingSidebarManager.uninit();
2480-
}
2476+
ShoppingSidebarManager.uninit();
24812477

24822478
// Now either cancel delayedStartup, or clean up the services initialized from
24832479
// it.
@@ -5885,9 +5881,7 @@ var TabsProgressListener = {
58855881

58865882
// Some shops use pushState to move between individual products, so
58875883
// the shopping code needs to be told about all of these.
5888-
if (AppConstants.NIGHTLY_BUILD) {
5889-
ShoppingSidebarManager.onLocationChange(aBrowser, aLocationURI, aFlags);
5890-
}
5884+
ShoppingSidebarManager.onLocationChange(aBrowser, aLocationURI, aFlags);
58915885

58925886
// Filter out location changes caused by anchor navigation
58935887
// or history.push/pop/replaceState.

browser/base/content/browser.xhtml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@
8787
<!-- Untranslated FTL files -->
8888
<link rel="localization" href="preview/enUS-searchFeatures.ftl" />
8989
<link rel="localization" href="preview/interventions.ftl" />
90-
#ifdef NIGHTLY_BUILD
9190
<link rel="localization" href="browser/shopping.ftl"/>
9291
<link rel="localization" href="preview/shopping.ftl"/>
93-
#endif
9492

9593
<title data-l10n-id="browser-main-window-title"></title>
9694

@@ -119,9 +117,7 @@
119117
Services.scriptloader.loadSubScript("chrome://browser/content/places/places-menupopup.js", this);
120118
Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
121119
Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
122-
if (AppConstants.NIGHTLY_BUILD) {
123-
Services.scriptloader.loadSubScript("chrome://browser/content/shopping/shopping-sidebar.js", this);
124-
}
120+
Services.scriptloader.loadSubScript("chrome://browser/content/shopping/shopping-sidebar.js", this);
125121

126122
window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
127123
window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);

browser/base/content/navigator-toolbox.inc.xhtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@
377377
<image class="urlbar-icon" id="translations-button-circle-arrows" />
378378
<html:span id="translations-button-locale" aria-hidden="true" />
379379
</hbox>
380-
#ifdef NIGHTLY_BUILD
381380
<hbox id="shopping-sidebar-button"
382381
class="urlbar-page-action"
383382
role="button"
@@ -387,7 +386,6 @@
387386
<image id="shopping-sidebar-button-icon"
388387
class="urlbar-icon"/>
389388
</hbox>
390-
#endif
391389
<toolbarbutton id="urlbar-zoom-button"
392390
onclick="FullZoom.resetFromURLBar(event);"
393391
tooltip="dynamic-shortcut-tooltip"

browser/base/content/test/static/browser_all_files_referenced.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ if (AppConstants.MOZ_BACKGROUNDTASKS) {
8888
gExceptionPaths.push("resource://app/modules/backgroundtasks/");
8989
}
9090

91-
// Temporary allowlist for shopping - we'll reference this soon.
92-
if (AppConstants.NIGHTLY_BUILD) {
93-
gExceptionPaths.push("chrome://browser/content/shopping/shopping.html");
94-
gExceptionPaths.push("chrome://global/content/shopping/ShoppingProduct.mjs");
95-
}
96-
9791
if (AppConstants.NIGHTLY_BUILD) {
9892
// This is nightly-only debug tool.
9993
gExceptionPaths.push(

browser/components/BrowserGlue.sys.mjs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,11 +2065,7 @@ BrowserGlue.prototype = {
20652065
() => lazy.NewTabUtils.uninit(),
20662066
() => lazy.Normandy.uninit(),
20672067
() => lazy.RFPHelper.uninit(),
2068-
() => {
2069-
if (AppConstants.NIGHTLY_BUILD) {
2070-
lazy.ShoppingUtils.uninit();
2071-
}
2072-
},
2068+
() => lazy.ShoppingUtils.uninit(),
20732069
() => lazy.ASRouterNewTabHook.destroy(),
20742070
() => {
20752071
if (AppConstants.MOZ_UPDATER) {
@@ -2982,7 +2978,6 @@ BrowserGlue.prototype = {
29822978

29832979
{
29842980
name: "ShoppingUtils.init",
2985-
condition: AppConstants.NIGHTLY_BUILD,
29862981
task: () => {
29872982
lazy.ShoppingUtils.init();
29882983
},

browser/components/about/AboutRedirector.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,12 @@ static const RedirEntry kRedirMap[] = {
9595
{"sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml",
9696
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT |
9797
nsIAboutModule::IS_SECURE_CHROME_UI},
98-
#ifdef NIGHTLY_BUILD
9998
{"shoppingsidebar", "chrome://browser/content/shopping/shopping.html",
10099
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
101100
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
102101
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
103102
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT |
104103
nsIAboutModule::IS_SECURE_CHROME_UI},
105-
#endif
106104
{"tabcrashed", "chrome://browser/content/aboutTabCrashed.xhtml",
107105
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
108106
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT},

browser/components/about/components.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ pages = [
3131
'rights',
3232
'robots',
3333
'sessionrestore',
34+
'shoppingsidebar',
3435
'tabcrashed',
3536
'unloads',
3637
'welcome',
3738
'welcomeback',
3839
]
3940

40-
if buildconfig.substs.get('NIGHTLY_BUILD'):
41-
pages += ['shoppingsidebar']
42-
4341
Classes = [
4442
{
4543
'cid': '{7e4bb6ad-2fc4-4dc6-89ef-23e8e5ccf980}',

browser/components/moz.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ DIRS += [
5555
"search",
5656
"sessionstore",
5757
"shell",
58+
"shopping",
5859
"syncedtabs",
5960
"tabunloader",
6061
"textrecognition",
@@ -65,9 +66,6 @@ DIRS += [
6566

6667
DIRS += ["build"]
6768

68-
if CONFIG["NIGHTLY_BUILD"]:
69-
DIRS += ["shopping"]
70-
7169

7270
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
7371
DIRS += ["touchbar"]

browser/locales/jar.mn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
preview/protections.ftl (../components/protections/content/protections.ftl)
1313
preview/interventions.ftl (../components/urlbar/content/interventions.ftl)
1414
preview/enUS-searchFeatures.ftl (../components/urlbar/content/enUS-searchFeatures.ftl)
15-
#ifdef NIGHTLY_BUILD
1615
preview/shopping.ftl (../components/shopping/content/shopping.ftl)
17-
#endif
1816
browser (%browser/**/*.ftl)
1917

2018
@AB_CD@.jar:

toolkit/components/moz.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ DIRS += [
6565
"search",
6666
"sessionstore",
6767
"shell",
68+
"shopping",
6869
"startup",
6970
"statusfilter",
7071
"telemetry",
@@ -110,9 +111,6 @@ if CONFIG["MOZ_UPDATE_AGENT"]:
110111

111112
DIRS += ["build"]
112113

113-
if CONFIG["NIGHTLY_BUILD"]:
114-
DIRS += ["shopping"]
115-
116114
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
117115
DIRS += ["aboutthirdparty", "aboutwindowsmessages", "gfx"]
118116

0 commit comments

Comments
 (0)