Reporting: Send CORS preflight before uploading reports

Per, we're supposed to send a
CORS preflight request before uploading reports, if the origin of the
reports is different than the origin of the collector.

There is existing CORS preflight code in both Blink and the Network
Service.  Code in //net isn't allowed to depend on either of those;
instead of using a delegate to handle the inverted dependency, we just
send out the preflight request by hand, just like the Expect-CT code

Bug: 860802
Change-Id: Ib20db54d3d2597d9fbacfe356e61cc6d3bc9d5fc
Commit-Queue: Douglas Creager <>
Reviewed-by: Misha Efimov <>
Cr-Commit-Position: refs/heads/master@{#574836}
7 files changed