Store |initiator_origin| in FrameNavigationEntry.

Changes in this CL
==================

This CL:

1. Updates FrameNavigationEntry::UpdateEntry and
   FrameNavigationEntry's constructor so that they both take
   |const base::Optional<url::Origin>& initiator_origin| which
   gets stored in a new FrameNavigationEntry::initiator_origin_ field.

2. Updates callers of FNE::UpdateEntry and FNE's constructor to
   provide/propagate the initiator as needed.  This includes
   adding an |initiator_origin| parameter to
   - NavigationEntryImpl's constructor
   - NavigationEntryImpl::AddOrUpdateFrameEntry
   - NavigationController::CreateNavigationEntry
   (the list above is not necessarily exhaustive/complete)

3. Uses the new |FrameNavigationEntry::initiator_origin()| from
   NavigationEntryImpl::ConstructCommonNavigationParams (which
   used to always provide |base::nullopt| initiator for history
   navigations - always treating them as browser-initiated, rather
   than replaying the original initiator).

The changes above makes sure that the right Sec-Fetch-Site http request header is
"replayed" during history navigations.  The CL adds browser tests and
WPT tests to cover the new, desired behavior.


Follow-up changes
=================

This CL does not:

- Use |FrameNavigationEntry::initiator_origin()| in GetOriginForURLLoaderFactory
  in render_frame_host_impl.cc (this will be done in a follow-up CL at
  https://crrev.com/c/1672176)

- Handle persisting |FrameNavigationEntry::initiator_origin()| for
  session restore (this is tracked in a separate https://crbug.com/976055).

Bug: 946503
Change-Id: I4f92614873a5ec8d4b52d3ae22031c7089d87ed5
Tbr: [email protected] for //components/sessions
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662738
Commit-Queue: Łukasz Anforowicz <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: Mike West <[email protected]>
Reviewed-by: David Trainor <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Auto-Submit: Łukasz Anforowicz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#677046}
35 files changed