Remove legacy telemetry code as non functional now
This commit is contained in:
@@ -81,11 +81,9 @@ const Logic = {
|
||||
|
||||
// Retrieve the list of identities.
|
||||
const identitiesPromise = this.refreshIdentities();
|
||||
// Get the onboarding variation
|
||||
const variationPromise = this.getShieldStudyVariation();
|
||||
|
||||
try {
|
||||
await Promise.all([identitiesPromise, variationPromise]);
|
||||
await identitiesPromise;
|
||||
} catch(e) {
|
||||
throw new Error("Failed to retrieve the identities or variation. We cannot continue. ", e.message);
|
||||
}
|
||||
@@ -158,7 +156,7 @@ const Logic = {
|
||||
};
|
||||
// Handle old style rejection with null and also Promise.reject new style
|
||||
try {
|
||||
return await browser.contextualIdentities.get(cookieStoreId) || defaultContainer;
|
||||
return await browser.contextualIdentities.get(cookieStoreId) || defaultContainer;
|
||||
} catch(e) {
|
||||
return defaultContainer;
|
||||
}
|
||||
@@ -274,14 +272,6 @@ const Logic = {
|
||||
return identity.cookieStoreId;
|
||||
},
|
||||
|
||||
sendTelemetryPayload(message = {}) {
|
||||
if (!message.event) {
|
||||
throw new Error("Missing event name for telemetry");
|
||||
}
|
||||
message.method = "sendTelemetryPayload";
|
||||
browser.runtime.sendMessage(message);
|
||||
},
|
||||
|
||||
removeIdentity(userContextId) {
|
||||
if (!userContextId) {
|
||||
return Promise.reject("removeIdentity must be called with userContextId argument.");
|
||||
@@ -317,13 +307,6 @@ const Logic = {
|
||||
});
|
||||
},
|
||||
|
||||
async getShieldStudyVariation() {
|
||||
const variation = await browser.runtime.sendMessage({
|
||||
method: "getShieldStudyVariation"
|
||||
});
|
||||
this._onboardingVariation = variation;
|
||||
},
|
||||
|
||||
generateIdentityName() {
|
||||
const defaultName = "Container #";
|
||||
const ids = [];
|
||||
@@ -474,9 +457,6 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
|
||||
});
|
||||
|
||||
Logic.addEnterHandler(document.querySelector("#edit-containers-link"), () => {
|
||||
Logic.sendTelemetryPayload({
|
||||
event: "edit-containers"
|
||||
});
|
||||
Logic.showPanel(P_CONTAINERS_EDIT);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user