Remove remaining traces of localStorage

Add window.storage to the background page, which loads all data from the
'items' store in indexeddb, caching them in memory for synchronous
access, then override textsecure storage to use that in memory store.
This commit is contained in:
lilia 2015-05-12 15:14:20 -07:00
parent a3c5b0959f
commit 3f37cd21a9
7 changed files with 177 additions and 140 deletions

View file

@ -98,12 +98,12 @@
window.textsecure = window.textsecure || {};
window.textsecure.registration = {
done: function () {
localStorage.setItem("chromiumRegistrationDone", "");
storage.put("chromiumRegistrationDone", "");
extension.trigger('registration_done');
},
isDone: function () {
return localStorage.getItem("chromiumRegistrationDone") !== null;
return storage.get("chromiumRegistrationDone") === "";
},
};