1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

Remove last remnants of old analytics code (#345)

This commit is contained in:
Oscar Hinton
2021-04-14 21:34:30 +02:00
committed by GitHub
parent 0a0cdaa7fd
commit 92df633040
26 changed files with 1 additions and 202 deletions

View File

@@ -16,14 +16,12 @@ import { MessagingService } from '../../abstractions/messaging.service';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { StorageService } from '../../abstractions/storage.service';
import { AnalyticsIds } from '../../misc/analytics';
import { ElectronConstants } from '../electronConstants';
export class ElectronPlatformUtilsService implements PlatformUtilsService {
identityClientId: string;
private deviceCache: DeviceType = null;
private analyticsIdCache: string = null;
constructor(private i18nService: I18nService, private messagingService: MessagingService,
private isDesktopApp: boolean, private storageService: StorageService) {
@@ -86,19 +84,6 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
return isMacAppStore();
}
analyticsId(): string {
if (!this.isDesktopApp) {
return null;
}
if (this.analyticsIdCache) {
return this.analyticsIdCache;
}
this.analyticsIdCache = (AnalyticsIds as any)[this.getDevice()];
return this.analyticsIdCache;
}
isViewOpen(): Promise<boolean> {
return Promise.resolve(false);
}
@@ -163,14 +148,6 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
return Promise.resolve(result.response === 0);
}
eventTrack(action: string, label?: string, options?: any) {
this.messagingService.send('analyticsEventTrack', {
action: action,
label: label,
options: options,
});
}
isDev(): boolean {
return isDev();
}