While our long-term goal is to drive host behavior from the service,
there is a fair bit of code which runs before we can connect to the
service which needs to know which mode the host is in. There are
also a few in-flight efforts which greatly benefit from this
knowledge.
Therefore I am adding a hint to the host config which will be used
for early configuration and validation. I call it a hint because
the actual behavior will be defined by the scopes in the refresh
token and the session policies which are sent down to the host
and client.
This means the hint can be used to influence the initialization
path the host takes but the host will not be connectable or
usable if someone tampers with the config.
Also, as part of this change I'm renaming |is_corp_user| to
|is_corp_host| and using that to make init decisions. The reason
for changing is that the host configuration, meaning the manner
in which it was configured, is not user dependent and that will
become increasingly true in the future. Rather than require the
backend service to return a value indicating the user type, it's
far simpler to just include that bit in the host config.
Bug: 346826154, 325448647
Change-Id: I1b6ea45fbb1b9120aed9c92c0f9a2862d99a1e5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5841315
Auto-Submit: Joe Downing <joedow@chromium.org>
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1352328}