Move async same document navigation special-case to DocumentLoader

Normally, same document navigations are synchronous. However, if the
same document navigation is requested by a cross-origin document, we
perform it asynchronously to make it harder to leak url information
to the initiator. This moves that special-case from NavigationScheduler,
which is going away, to DocumentLoader and makes it an implementation
detail of DocumentLoader::CommitSameDocumentNavigation.

Bug: 914587
Change-Id: I78b2d49d23fec4ad2a83139cc4a4ce39f22de4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584367
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654919}
2 files changed