Stop calls to mediGalleries for document providers

The chrome.mediaGalleries.getMetadata() API fails to call
the passed in callback function if the blob passed in to it
is a reference to a DocumentsProvider file.

This CL checks if we're trying to retrieve metadata for a
volume that's a documents provider, and stops the request.

adds metadata requests that trigger the bug.

       To run, use browser_tests --gtest_filter="*metadataDocumentsProvider*"

Bug: 942417
Tests: Integration test covers this case for DocumentsProvider volume.
Change-Id: I2b9e317a4487d2341cc46067de3d8a3091c5287d
Commit-Queue: Alex Danilo <>
Reviewed-by: Luciano Pacheco <>
Cr-Commit-Position: refs/heads/master@{#642836}
4 files changed