patch: handle gerrit results that omit http/https results

When dealing with GoB instances that do not support http or https
(and only support sso), the patch walking loader fails since it
always assumes http is available.  Rework the code to walk a bunch
of known protocols instead and stop when we find one that works.

BUG=chromium:606168
TEST=`gerrit -g googleplex-android inspect 825814` doesn't fail on patch parsing

Change-Id: Id7338b973f566254459350a6b708c96fbdf4f8b7
Reviewed-on: https://chromium-review.googlesource.com/416328
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
2 files changed