storage: have idb talk to BlobStorageContext via mojo

This changes the "reading blobs" part of IndexedDB to use the
storage.mojom.BlobStorageContext mojo interface for creating
file-backed blobs.

It uses this mojo interface from the idb task runner, owned
by the IndexedDBDispatcherHost.  CreateAllBlobs no longer can
fail (as all callsites already check that the dispatcher host
exists), which cleans up some code as well.

Instead of having files, they use the BlobDataItem(Reader) types
to provide the file information to the blob system.  This also
frees IndexedDB in the future to back these blobs in any way that
it chooses, not necessarily via files.

Because ShareableFileReference is used by both the browser and
in IndexedDB, a new way of tracking live file references is used.
IndexedDBDispatcherHost has a map of file paths to active
BlobDataItemReaders, and calls the release callback when all
the mojo pipes to that reader have been closed.  This lets
ShareableFileReference continue to live on the IO thread for
the browser use cases and will let IndexedDB more easily move
to the storage service without this dependency.

The followup to this cl is to change IndexedDBBlobInfo to use
blob remotes instead of BlobDataHandle and to return clones of
those remotes rather than using BlobImpl::Create directly.

Bug: 1022214
Change-Id: Ia1abc519fd5877aaf2313e45d0daea4a38c52d7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1902474
Commit-Queue: enne <[email protected]>
Reviewed-by: Marijn Kruisselbrink <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Daniel Murphy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#719453}
21 files changed