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

getDomain moved to jslib

This commit is contained in:
Kyle Spearrin
2018-10-13 22:52:49 -04:00
parent 9320d73c99
commit 48a0b84bfe
7 changed files with 18 additions and 90 deletions

View File

@@ -50,6 +50,7 @@ import { NotificationsService as NotificationsServiceAbstraction } from 'jslib/a
import { SearchService as SearchServiceAbstraction } from 'jslib/abstractions/search.service';
import { Analytics } from 'jslib/misc';
import { Utils } from 'jslib/misc/utils';
import { BrowserApi } from '../browser/browserApi';
@@ -134,8 +135,7 @@ export default class MainBackground {
this.userService = new UserService(this.tokenService, this.storageService);
this.settingsService = new SettingsService(this.userService, this.storageService);
this.cipherService = new CipherService(this.cryptoService, this.userService, this.settingsService,
this.apiService, this.storageService, this.i18nService, this.platformUtilsService,
() => this.searchService);
this.apiService, this.storageService, this.i18nService, () => this.searchService);
this.folderService = new FolderService(this.cryptoService, this.userService, this.apiService,
this.storageService, this.i18nService, this.cipherService);
this.collectionService = new CollectionService(this.cryptoService, this.userService, this.storageService,
@@ -156,7 +156,7 @@ export default class MainBackground {
this.passwordGenerationService = new PasswordGenerationService(this.cryptoService, this.storageService);
this.totpService = new TotpService(this.storageService, cryptoFunctionService);
this.autofillService = new AutofillService(this.cipherService, this.userService, this.totpService);
this.containerService = new ContainerService(this.cryptoService, this.platformUtilsService);
this.containerService = new ContainerService(this.cryptoService);
this.auditService = new AuditService(cryptoFunctionService, this.apiService);
this.exportService = new ExportService(this.folderService, this.cipherService, this.apiService);
this.notificationsService = new NotificationsService(this.userService, this.syncService, this.appIdService,
@@ -529,7 +529,7 @@ export default class MainBackground {
return;
}
const tabDomain = this.platformUtilsService.getDomain(tab.url);
const tabDomain = Utils.getDomain(tab.url);
if (tabDomain == null) {
return;
}

View File

@@ -200,7 +200,7 @@ export default class RuntimeBackground {
continue;
}
const tabDomain = this.platformUtilsService.getDomain(tab.url);
const tabDomain = Utils.getDomain(tab.url);
if (tabDomain != null && tabDomain !== queueMessage.domain) {
continue;
}
@@ -235,7 +235,7 @@ export default class RuntimeBackground {
continue;
}
const tabDomain = this.platformUtilsService.getDomain(tab.url);
const tabDomain = Utils.getDomain(tab.url);
if (tabDomain != null && tabDomain !== queueMessage.domain) {
continue;
}
@@ -264,7 +264,7 @@ export default class RuntimeBackground {
continue;
}
const tabDomain = this.platformUtilsService.getDomain(tab.url);
const tabDomain = Utils.getDomain(tab.url);
if (tabDomain != null && tabDomain !== queueMessage.domain) {
continue;
}
@@ -278,7 +278,7 @@ export default class RuntimeBackground {
}
private async addLogin(loginInfo: any, tab: any) {
const loginDomain = this.platformUtilsService.getDomain(loginInfo.url);
const loginDomain = Utils.getDomain(loginInfo.url);
if (loginDomain == null) {
return;
}
@@ -314,7 +314,7 @@ export default class RuntimeBackground {
}
private async changedPassword(changeData: any, tab: any) {
const loginDomain = this.platformUtilsService.getDomain(changeData.url);
const loginDomain = Utils.getDomain(changeData.url);
if (loginDomain == null) {
return;
}