summaryrefslogtreecommitdiff
path: root/src/bg/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bg/main.js')
-rw-r--r--src/bg/main.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bg/main.js b/src/bg/main.js
index 47ee89e..75ea868 100644
--- a/src/bg/main.js
+++ b/src/bg/main.js
@@ -26,15 +26,17 @@
let policyData = (await Storage.get("sync", "policy")).policy;
if (policyData && policyData.DEFAULT) {
ns.policy = new Policy(policyData);
+ await ChildPolicies.update(policyData);
} else {
await include("/legacy/Legacy.js");
ns.policy = await Legacy.createOrMigratePolicy();
ns.savePolicy();
}
-
+
+
await include("/bg/defaults.js");
await ns.defaults;
- await include(["/bg/RequestGuard.js", "/bg/RequestUtil.js"]);
+ await include("/bg/RequestGuard.js");
await RequestGuard.start();
await XSS.start(); // we must start it anyway to initialize sub-objects
if (!ns.sync.xss) {
@@ -226,6 +228,7 @@
async savePolicy() {
if (this.policy) {
+ await ChildPolicies.update(this.policy);
await Storage.set("sync", {
policy: this.policy.dry()
});