1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

Remove dead code (#1787)

* Remove dead analytics code
This commit is contained in:
Oscar Hinton
2021-04-14 23:43:09 +02:00
committed by GitHub
parent dd6b08bb2c
commit 44463e7bc0
19 changed files with 23 additions and 197 deletions

View File

@@ -2,8 +2,6 @@ import { BrowserApi } from '../browser/browserApi';
import MainBackground from './main.background';
import { Analytics } from 'jslib/misc';
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { VaultTimeoutService } from 'jslib/abstractions/vaultTimeout.service';
@@ -13,8 +11,7 @@ export default class CommandsBackground {
private isVivaldi: boolean;
constructor(private main: MainBackground, private passwordGenerationService: PasswordGenerationService,
private platformUtilsService: PlatformUtilsService, private analytics: Analytics,
private vaultTimeoutService: VaultTimeoutService) {
private platformUtilsService: PlatformUtilsService, private vaultTimeoutService: VaultTimeoutService) {
this.isSafari = this.platformUtilsService.isSafari();
this.isVivaldi = this.platformUtilsService.isVivaldi();
}
@@ -57,11 +54,6 @@ export default class CommandsBackground {
const password = await this.passwordGenerationService.generatePassword(options);
this.platformUtilsService.copyToClipboard(password, { window: window });
this.passwordGenerationService.addHistory(password);
this.analytics.ga('send', {
hitType: 'event',
eventAction: 'Generated Password From Command',
});
}
private async autoFillLogin(tab?: any) {
@@ -78,11 +70,6 @@ export default class CommandsBackground {
}
await this.main.collectPageDetailsForContentScript(tab, 'autofill_cmd');
this.analytics.ga('send', {
hitType: 'event',
eventAction: 'Autofilled From Command',
});
}
private async openPopup() {
@@ -92,9 +79,5 @@ export default class CommandsBackground {
}
this.main.openPopup();
this.analytics.ga('send', {
hitType: 'event',
eventAction: 'Opened Popup From Command',
});
}
}