IndexedDB: Update DispatcherHost to use WeakPtr ref to BlobStorageContext

IndexedDBDispatcherHost keeps a scoped_refptr<ChromeBlobStorageContext>
so that it can pass a pointer to storage::BlobStorageContext around.
The pointer is used during work on the IO thread to access the
BlobStorage system.

Technically, there's no requirement that the blob storage system be
kept alive to complete operations.  Really, BlobStorage should always
be running, and any situation where it isn't indicates the backing
system for storage is being / has been torn down.

Since that means that IndexedDBDispatcherHost doesn't actually "own"
the ChromeBlobStorageContext instance, it's more accurate for this
reference to be held as a WeakPtr and tested when it's needed.

This change will be even more important when, in a later change,
IndexedDBDispatcherHost's residence will move to the IDB task runner
where it won't be possible to destroy ChromeBlobStorageContext
correctly during shutdown.

Bug: 717812
Change-Id: Ided90f751dc03ab0e59d8be3e4666524929336ba
Reviewed-on: https://chromium-review.googlesource.com/c/1457016
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Chase Phillips <cmp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631085}
8 files changed