client hints: Rework how persistent settings are communicated to renderer

Before this CL, the entire settings map was sent to the renderer,
it then parsed accept-ch, and sent IPCs to the browser to persist
settings.

This has following downsides:
1) client-hint settings map can leak history to render (I don't know
   if there are other sources of that, probably, so maybe not such a
   big deal)
2) If this becomes popular, map size would be a performance risk
3) This requires trusting renderer to update client hint settings.

Instead, this uses existing network service hook to parse accept-ch
(which was needed for navigation redirects), and the browser persists
the results and sends the relevant client hint configuration to the
renderer with CommitParams. The IPC for renderer to write config
is therefore removed.

This required teaching the browser code to behave more consistently
with some flags (lang, accept-ch-lifetime support).

Change-Id: I421b3c07d4644e179a0f6a26088e44c55f68f7d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081628
Commit-Queue: Maksim Orlovich <[email protected]>
Reviewed-by: Yoav Weiss <[email protected]>
Reviewed-by: Mike West <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Reviewed-by: Tarun Bansal <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/master@{#784031}
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index ab8a697..cc12496 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -3305,7 +3305,9 @@
           GURL() /* base_url_override_for_web_bundle */,
           node->pending_frame_policy(),
           std::vector<std::string>() /* force_enabled_origin_trials */,
-          false /* origin_isolation_restricted */);
+          false /* origin_isolation_restricted */,
+          std::vector<
+              network::mojom::WebClientHintsType>() /* enabled_client_hints */);
 #if defined(OS_ANDROID)
   if (ValidateDataURLAsString(params.data_url_as_string)) {
     commit_params->data_url_as_string = params.data_url_as_string->data();