Do not update Pending Item URL with URL that have a different origin.

NavigationManagerImpl::UpdatePendingItemUrl exists to update the URL
for redirects. UpdatePendingItemUrl is no longer used for server side
redirects, so this change makes sure that pending item origin is never
changed to prevent URL spoofing bugs.

Conceptually this is not the right fix, because NavigationManager
assumes that there can be only one pending navigation (which is not
true with WKWebView). The right fix would be to switch to WK-based
navigation manager, so this CL is just a workaround.

Bug: 805900
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I20eed4a661244c0fec52a87b088c0620c5f57036
Reviewed-on: https://chromium-review.googlesource.com/923546
Reviewed-by: Danyao Wang <danyao@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538237}
1 file changed