Bug 1705747: fixing Removed DeviceId code from screenshots r=emalysz

Differential Revision: https://phabricator.services.mozilla.com/D112957
This commit is contained in:
Falguni Islam 2021-04-21 18:02:13 +00:00
Родитель 48d28c646b
Коммит 794b4f8785
4 изменённых файлов: 3 добавлений и 14 удалений

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

@ -44,7 +44,6 @@ this.analytics = (function() {
}
const eventsUrl = `${main.getBackend()}/event`;
const deviceId = auth.getDeviceId();
const sendTime = Date.now();
pendingEvents.forEach(event => {
@ -55,7 +54,7 @@ this.analytics = (function() {
);
});
const body = JSON.stringify({ deviceId, events: pendingEvents });
const body = JSON.stringify({ events: pendingEvents });
const fetchRequest = fetch(
eventsUrl,
Object.assign({ body }, fetchOptions)
@ -70,8 +69,7 @@ this.analytics = (function() {
}
const timingsUrl = `${main.getBackend()}/timing`;
const deviceId = auth.getDeviceId();
const body = JSON.stringify({ deviceId, timings: pendingTimings });
const body = JSON.stringify({ timings: pendingTimings });
const fetchRequest = fetch(
timingsUrl,
Object.assign({ body }, fetchOptions)

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

@ -28,13 +28,8 @@ this.auth = (function() {
})
);
exports.getDeviceId = function() {
return registrationInfo && registrationInfo.deviceId;
};
function generateRegistrationInfo() {
const info = {
deviceId: `anon${makeUuid()}`,
secret: makeUuid(),
registered: false,
};
@ -71,7 +66,6 @@ this.auth = (function() {
});
req.send(
JSON.stringify({
deviceId: registrationInfo.deviceId,
secret: registrationInfo.secret,
deviceInfo: JSON.stringify(deviceInfo()),
})
@ -133,7 +127,6 @@ this.auth = (function() {
req.setRequestHeader("content-type", "application/json");
req.send(
JSON.stringify({
deviceId: registrationInfo.deviceId,
secret: registrationInfo.secret,
deviceInfo: JSON.stringify(deviceInfo()),
ownershipCheck,
@ -208,7 +201,6 @@ this.auth = (function() {
return login({ ownershipCheck }).then(result => {
return {
isOwner: result && result.isOwner,
deviceId: registrationInfo.deviceId,
accountId,
authHeaders,
};

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

@ -650,7 +650,7 @@ thumbnail abTests firefoxChannel
// Attributes that will be accepted in the constructor, but ignored/dropped
AbstractShot.prototype.DEPRECATED_ATTRS = `
microdata history ogTitle createdDevice head body htmlAttrs bodyAttrs headAttrs
readable hashtags comments showPage isPublic resources deviceId url
readable hashtags comments showPage isPublic resources url
fullScreenThumbnail favicon
`.split(/\s+/g);

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

@ -82,7 +82,6 @@ this.sitehelper = (function() {
if (info) {
sendBackupCookieRequest(info.authHeaders);
sendCustomEvent("login-successful", {
deviceId: info.deviceId,
accountId: info.accountId,
isOwner: info.isOwner,
backupCookieRequest: true,