Fixup: No throws in notifySignInStateChanged Fixup: Make sure getToken is non nullable Fixup: Rename AuthProvider::requireAuthProvider Fixup: Rename IPPAndroidAuthProviderSingletonIPPAndroidFxAAuthProviderSingleton Differential Revision: https://phabricator.services.mozilla.com/D297335
47 lines
1.7 KiB
JavaScript
47 lines
1.7 KiB
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
import { IPProtectionService } from "moz-src:///toolkit/components/ipprotection/IPProtectionService.sys.mjs";
|
|
import { IPPProxyManager } from "moz-src:///toolkit/components/ipprotection/IPPProxyManager.sys.mjs";
|
|
import { IPPAutoRestoreHelper } from "moz-src:///toolkit/components/ipprotection/IPPAutoRestore.sys.mjs";
|
|
import { IPPAutoStartHelpers } from "moz-src:///toolkit/components/ipprotection/IPPAutoStart.sys.mjs";
|
|
import { IPPNimbusHelper } from "moz-src:///toolkit/components/ipprotection/IPPNimbusHelper.sys.mjs";
|
|
import { IPProtectionServerlist } from "moz-src:///toolkit/components/ipprotection/IPProtectionServerlist.sys.mjs";
|
|
import { IPPStartupCache } from "moz-src:///toolkit/components/ipprotection/IPPStartupCache.sys.mjs";
|
|
import { IPPSessionPrefManager } from "moz-src:///toolkit/components/ipprotection/IPPSessionPrefManager.sys.mjs";
|
|
|
|
const coreHelpers = [
|
|
IPPStartupCache,
|
|
IPProtectionServerlist,
|
|
IPPProxyManager,
|
|
IPPSessionPrefManager,
|
|
IPPAutoRestoreHelper,
|
|
...IPPAutoStartHelpers,
|
|
IPPNimbusHelper,
|
|
];
|
|
|
|
let extraHelpers = [];
|
|
|
|
export const IPProtectionActivator = {
|
|
addHelpers(helpers) {
|
|
extraHelpers.push(...helpers);
|
|
},
|
|
removeHelpers() {
|
|
extraHelpers = [];
|
|
},
|
|
setupHelpers() {
|
|
IPProtectionService.setHelpers([...coreHelpers, ...extraHelpers]);
|
|
},
|
|
setAuthProvider(authProvider) {
|
|
IPProtectionService.setAuthProvider(authProvider);
|
|
},
|
|
init() {
|
|
this.setupHelpers();
|
|
return IPProtectionService.init();
|
|
},
|
|
uninit() {
|
|
return IPProtectionService.uninit();
|
|
},
|
|
};
|