Bug 1659106 - Rename TopSiteAttribution.jsm to PartnerLinkAttribution.jsm. r=dao

Differential Revision: https://phabricator.services.mozilla.com/D87073
This commit is contained in:
Mark Banner 2020-08-18 08:04:07 +00:00
Родитель 4cd784c5d8
Коммит 52ac364a8c
4 изменённых файлов: 14 добавлений и 11 удалений

Просмотреть файл

@ -14,6 +14,11 @@ ChromeUtils.defineModuleGetter(
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"PartnerLinkAttribution",
"resource:///modules/PartnerLinkAttribution.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"PlacesUtils",
@ -24,11 +29,6 @@ ChromeUtils.defineModuleGetter(
"PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"TopSiteAttribution",
"resource:///modules/TopSiteAttribution.jsm"
);
const LINK_BLOCKED_EVENT = "newtab-linkBlocked";
const PLACES_LINKS_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for places links changed events
@ -505,7 +505,7 @@ class PlacesFeed {
break;
}
case at.TOP_SITES_ATTRIBUTION:
TopSiteAttribution.makeRequest(action.data);
PartnerLinkAttribution.makeRequest(action.data);
break;
}
}

Просмотреть файл

@ -17,8 +17,8 @@ XPCOMUtils.defineLazyModuleGetters(this, {
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
ReaderMode: "resource://gre/modules/ReaderMode.jsm",
PartnerLinkAttribution: "resource:///modules/PartnerLinkAttribution.jsm",
Services: "resource://gre/modules/Services.jsm",
TopSiteAttribution: "resource:///modules/TopSiteAttribution.jsm",
UrlbarController: "resource:///modules/UrlbarController.jsm",
UrlbarEventBufferer: "resource:///modules/UrlbarEventBufferer.jsm",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
@ -629,7 +629,7 @@ class UrlbarInput {
this.controller.recordSelectedResult(event, result);
if (result.payload.sendTopSiteAttributionRequest) {
TopSiteAttribution.makeRequest({
PartnerLinkAttribution.makeRequest({
targetURL: result.payload.url,
source: "urlbar",
});

Просмотреть файл

@ -6,7 +6,7 @@
Cu.importGlobalProperties(["fetch"]);
var EXPORTED_SYMBOLS = ["TopSiteAttribution"];
var EXPORTED_SYMBOLS = ["PartnerLinkAttribution"];
ChromeUtils.defineModuleGetter(
this,
@ -20,7 +20,7 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/Region.jsm"
);
var TopSiteAttribution = {
var PartnerLinkAttribution = {
async makeRequest({ targetURL, source }) {
let searchProvider = targetURL.match(/^https?:\/\/(?:www.)?([^.]*)/)[1];

Просмотреть файл

@ -73,6 +73,9 @@ with Files("LiveBookmarkMigrator.jsm"):
with Files("OpenInTabsUtils.jsm"):
BUG_COMPONENT = ("Firefox", "Tabbed Browser")
with Files("PartnerLinkAttribution.jsm"):
BUG_COMPONENT = ("Firefox", "Search")
with Files("PermissionUI.jsm"):
BUG_COMPONENT = ("Firefox", "Site Permissions")
@ -139,6 +142,7 @@ EXTRA_JS_MODULES += [
'NewTabPagePreloading.jsm',
'OpenInTabsUtils.jsm',
'PageActions.jsm',
'PartnerLinkAttribution.jsm',
'PermissionUI.jsm',
'PingCentre.jsm',
'ProcessHangMonitor.jsm',
@ -149,7 +153,6 @@ EXTRA_JS_MODULES += [
'TabsList.jsm',
'TabUnloader.jsm',
'ThemeVariableMap.jsm',
'TopSiteAttribution.jsm',
'TransientPrefs.jsm',
'webrtcUI.jsm',
'ZoomUI.jsm',