IndexedDB: Add some braces around multi-line if clauses

R=dgrogan@chromium.org

Review URL: https://codereview.chromium.org/108563008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240307 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 240307
GVDA: Ensure VDA is destroyed while the stub is still valid.

We should not be letting go of the stub while the VDA is still alive, as it
may require GL context while decoding, and/or to do its cleanup.

However, when using the IO thread message filter, we postpone destroying
VDA and return from OnWillDestroyStub, after which the stub will not valid.

To prevent this, move destruction of VDA to the stub destruction observer.
We have to be careful not to destroy it before the IO thread message filter
is removed however, because we cannot take the VDA away while messages may
still be serviced on IO thread. We cannot simply ensure the existence of
VDA on the IO thread to prevent this, because that would require
synchronization of the IO thread with the ChildThread. So we have to
synchronously wait on the ChildThread for the filter to be removed instead,
before returning from the stub destruction
observer.

Also, remove the DCHECK(stub_) checks, which don't really do anything, as
stub_ is DCHECKed in constructor and never changed afterwards.

Finally, fix a DCHECK in EVDA; StopDevicePoll, which may be called - when
the decoder thread is stopped - from the ChildThread.

BUG=326280, chrome-os-partner:24390
TEST=video playback, vdaunittest, confirming leaks are gone

Review URL: https://codereview.chromium.org/108803005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240308 0039d316-1c4b-4281-b951-d872f2087c98
Handle BITS transient error.

BUG=304354

Review URL: https://codereview.chromium.org/108873008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240309 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 240309