Fix client certificates through service workers.

Some https requests trigger TLS client certificate selection.
This is a dialog displayed to the user in the tab containing the frame
making the request.

Service workers broke this when they intercepted the request from a
frame, and reissued the request via fetch(). The service worker doesn't
have a frame and there is no information on the request that tracks back
to the frame.

This CL addreses that via the following mechanism.
ServiceWorkerProviderHost has a |fetch_request_window_id| which is
similar to |client_uuid|, except it is not a web-exposed GUID and is
reset on redirects during navigations.

This token is added to requests that go through service workers, and
identifies the originating frame. This corresponds to the Fetch
specification's concept of a request's associated |window|.

Now when the service worker reissues the request, and the browser wants
to display the UI, it can get the WebContents of the originating frame.

Limitations:
* Doesn't work for requests from workers that are intercepted
  by service workers. Workers aren't fully supported as service
  worker clients yet (they don't have their own
  ServiceWorkerProviderHost).
* The Fetch API's feature of disassociating a request via
  setting |init.window| to null in the constructor is not
  yet implemented.

Bug: 894484
Change-Id: I377f2103f62bee81bdee2c971b4359ee8a8b3049
Reviewed-on: https://chromium-review.googlesource.com/c/1290435
Commit-Queue: Matt Falkenhagen <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Nasko Oskov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#608691}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 85029d4..8cc48f5 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -1782,6 +1782,8 @@
     "web_contents/aura/shadow_layer_delegate.h",
     "web_contents/aura/types.cc",
     "web_contents/aura/types.h",
+    "web_contents/web_contents_getter_registry.cc",
+    "web_contents/web_contents_getter_registry.h",
     "web_contents/web_contents_impl.cc",
     "web_contents/web_contents_impl.h",
     "web_contents/web_contents_view.h",