Fix URLLoaderFactory use-after-free in NetworkPortalDetectorImpl

NetworkPortalDetectorImpl uses a raw pointer to the
SystemNetworkContextManager's URLLoaderFactory, which will be invalid
if mojo pipe runs into any issues. This CL makes it use a
SahredURLLoaderFactory instead, which will handle failures

Bug: 936625
Change-Id: I2ea71ef6cc46440f66349729e16cc2558ef145b1
Reviewed-by: John Abd-El-Malek <>
Reviewed-by: Alexander Alekseev <>
Commit-Queue: Robbie McElrath <>
Cr-Commit-Position: refs/heads/master@{#636645}
4 files changed