After looking into the speeds for removing data from IndexedDB, it was
found that using a cursor was slower than the other methods. This change
takes the remove logic and changes it to remove each key as part of
one transaction.
Closes#756
Change-Id: Iec3916650d8a4fe2b6353b604c070d8a0af7426c
This implements the workaround for a race in IndexedDB on IE/Edge.
If we don't get an 'upgradeneeded' event when we expect it, we will
close the connection and retry.
b/35993864
Change-Id: I78d1c18e4798c098167a1a6a184623780002a34f
On IE/Edge, it is possible for the IndexedDB database to not be deleted
when the success callback is fired. If we immediately create a new
connection to that database, it will connect to the old database. Once
the database is deleted, the connection will no longer have the data.
This adds some assertions that we get an upgrade event. This also adds
the framework for the workaround, but doesn't add it so we can give
this revision in the bug report. This deliberately increases the
failure rates on IE/Edge.
b/35993864
Change-Id: I3d142bdee6386fbe63f1b2def462a0e039723a38
To better support alternate storage mechanisms, this change abstracts
shaka.offline.DBEngine into an interface called
shaka.offline.IStorageEngine.
DBEngine has been changed to implement this interface, and allows the
addition of implementations that do not use IndexedDB.
Change-Id: I6a94067001ee53049df11cb68604bb57912300bb