added second run restore

This commit is contained in:
Kendall Werts
2019-12-18 13:57:19 -06:00
parent d61ea16db1
commit 88e32fc72f
2 changed files with 131 additions and 43 deletions
+13 -1
View File
@@ -76,12 +76,24 @@ const identityState = {
return this.updateUUID(cookieStoreId, uuidv4());
},
async lookupMACaddonUUID(cookieStoreId) {
const macConfigs = await this.storageArea.area.get();
for(const key of Object.keys(macConfigs)) {
if (key.includes("identitiesState@@_")) {
if(macConfigs[key] === cookieStoreId) {
return macConfigs[key].macAddonUUID;
}
}
}
return false;
},
async lookupCookieStoreId(macAddonUUID) {
const macConfigs = await this.storageArea.area.get();
for(const key of Object.keys(macConfigs)) {
if (key.includes("identitiesState@@_")) {
if(macConfigs[key].macAddonUUID === macAddonUUID) {
return key.replace(/^firefox-container-@@_/, "");
return String(key).replace(/^identitiesState@@_/, "");
}
}
}