Factor out WebSocket URL scheme conversions

There are three places where we convert a WebSocket URL to an HTTP URL.
Factor out a common function, net::ChangeWebSocketSchemeToHttpScheme(),
which can be used in all three places.

This is a follow-up to
https://chromium-review.googlesource.com/c/1458401.

Change-Id: Idc0efb9b57a5f74e334367938ee3b6b98f31291c
Reviewed-on: https://chromium-review.googlesource.com/c/1472993
Reviewed-by: Ɓukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632526}
6 files changed