Bug 1701529 - Remove unused FxA toolbar menu items r=preferences-reviewers,Gijs

Differential Revision: https://phabricator.services.mozilla.com/D111303
This commit is contained in:
Vijay Budhram 2021-04-09 19:08:03 +00:00
parent e2e4032966
commit 6ebff066e9
3 changed files with 1 additions and 60 deletions

View File

@ -1257,35 +1257,6 @@ var gSync = {
this.openFxAManagePage(entryPoint);
},
async openSendFromFxaMenu(panel) {
this.emitFxaToolbarTelemetry("open_send", panel);
this.launchFxaService(gFxaSendLoginUrl);
},
async openMonitorFromFxaMenu(panel) {
this.emitFxaToolbarTelemetry("open_monitor", panel);
this.launchFxaService(gFxaMonitorLoginUrl);
},
launchFxaService(serviceUrl, panel) {
let entryPoint = "fxa_discoverability_native";
if (this.isPanelInsideAppMenu(panel)) {
entryPoint = "fxa_app_menu";
}
const url = new URL(serviceUrl);
url.searchParams.set("utm_source", "fxa-toolbar");
url.searchParams.set("utm_medium", "referral");
url.searchParams.set("entrypoint", entryPoint);
const state = UIState.get();
if (state.status == UIState.STATUS_SIGNED_IN) {
url.searchParams.set("email", state.email);
}
switchToTabHavingURI(url, true, { replaceQueryString: true });
},
// Returns true if we managed to send the tab to any targets, false otherwise.
async sendTabToDevice(url, targets, title) {
const fxaCommandsDevices = [];

View File

@ -535,36 +535,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
}
);
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gFxaSendLoginUrl",
"identity.fxaccounts.service.sendLoginUrl",
false,
(aPref, aOldVal, aNewVal) => {
updateFxaToolbarMenu(gFxaToolbarEnabled);
}
);
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gFxaMonitorLoginUrl",
"identity.fxaccounts.service.monitorLoginUrl",
null,
(aPref, aOldVal, aNewVal) => {
updateFxaToolbarMenu(gFxaToolbarEnabled);
}
);
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gFxaDeviceName",
"identity.fxaccounts.account.device.name",
false,
(aPref, aOldVal, aNewVal) => {
updateFxaToolbarMenu(gFxaToolbarEnabled);
}
);
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gAddonAbuseReportEnabled",

View File

@ -92,7 +92,7 @@ var gSyncPane = {
let cachedComputerName = Services.prefs.getStringPref(
"identity.fxaccounts.account.device.name",
undefined
""
);
if (cachedComputerName) {
maybeAcct = true;