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

extract analytics class to jslib

This commit is contained in:
Kyle Spearrin
2018-01-26 10:48:32 -05:00
parent f2f34c8e70
commit caf45ad484
8 changed files with 26 additions and 107 deletions

View File

@@ -1,8 +1,9 @@
import { BrowserApi } from '../browser/browserApi';
import Analytics from '../scripts/analytics';
import MainBackground from './main.background';
import { Analytics } from 'jslib/misc';
import {
PasswordGenerationService,
PlatformUtilsService,

View File

@@ -1,8 +1,9 @@
import { BrowserApi } from '../browser/browserApi';
import Analytics from '../scripts/analytics';
import MainBackground from './main.background';
import { Analytics } from 'jslib/misc';
import {
CipherService,
PasswordGenerationService,

View File

@@ -41,7 +41,7 @@ import {
UtilsService as UtilsServiceAbstraction,
} from 'jslib/abstractions';
import Analytics from '../scripts/analytics';
import { Analytics } from 'jslib/misc';
import { BrowserApi } from '../browser/browserApi';
@@ -140,7 +140,8 @@ export default class MainBackground {
this.autofillService = new AutofillService(this.cipherService, this.tokenService,
this.totpService, this.utilsService, this.platformUtilsService);
this.containerService = new ContainerService(this.cryptoService, this.platformUtilsService);
this.analytics = new Analytics(window, this.platformUtilsService, this.storageService, this.appIdService);
this.analytics = new Analytics(window, () => BrowserApi.gaFilter(), this.platformUtilsService,
this.storageService, this.appIdService);
// Other fields
this.isSafari = this.platformUtilsService.isSafari();

View File

@@ -6,6 +6,8 @@ import { LoginView } from 'jslib/models/view/loginView';
import { ConstantsService } from 'jslib/services/constants.service';
import { UtilsService } from 'jslib/services/utils.service';
import { Analytics } from 'jslib/misc';
import {
CipherService,
PlatformUtilsService,
@@ -14,7 +16,6 @@ import {
import { BrowserApi } from '../browser/browserApi';
import Analytics from '../scripts/analytics';
import MainBackground from './main.background';
import { AutofillService } from '../services/abstractions/autofill.service';