commit | d16e059d75a005cba39f00e9495b3dffa8b69376 | [log] [tgz] |
---|---|---|
author | Adrienne Walker <[email protected]> | Wed Nov 27 01:25:52 2019 |
committer | Commit Bot <[email protected]> | Wed Nov 27 01:25:52 2019 |
tree | d7f178f6acc76536e48d15fa1ba209df463fcf75 | |
parent | cf74abc8ebebe47acdec695b3455010d227e27c7 [diff] |
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}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .