Reusing names of policy keys from policy_constants.h
Before this change, Chromoting-specific code under
src/remoting/host/policy_hack was introducing its own constants for
names of Chromoting policies, rather than reusing the constants already
generated into policy_constants.h from
src/components/policy/resources/policy_templates.json. This change
fixes this (as asked for by crbug.com/368321).
Removing names of policy keys from policy_watcher.cc is good because:
- It enourages keeping policy_templates.json in-sync with remoting code
(i.e. RemoteAccessHostTokenUrl was introduced to policy_watcher.cc but
not to policy_templates.json; after this changes this should be less
likely).
- Code removal is good.
Updating and keeping in-sync policy_templates.json is good because:
- This is where rest of Chromium infrastructure looks for policy
descriptions, examples, supported-since, etc.
- Up-to-date policy_templates.json is a pre-requisite for removing
src/remoting/host/policy_hack and instead reusing PolicyService and/or
ConfigurationPolicyProvider(s) for Win/Linux/Mac.
While working on the change, I've noticed that 5 out of 15 Chromoting
policies are not covered in policy_templates.json (i.e.
src/components/policy and src/remoting/host/policy_hack got out of
sync). This change fixes this as well. Notes:
- Making src/components/policy and src/remoting/host/policy_hack in-sync
again is good for the short-term.
- In the long-term we might want to somehow separate Chromoting-specific
policies out of policy_templates.json (separate
chromoting_policy_templates.json? separate supported_on?). This
should be done in a separate changelist because
1) the separation concerns should not block current changelist and
more importantly crrev.com/830193002 which gets rid of most code
under policy_hack and
2) the separation is quite involved in itself (i.e. need to account
for it2me/chromeos differences and make sure that tools for
enterprise admins continue to support chromoting policies).
BUG=368321
[email protected], [email protected], [email protected], [email protected]
Review URL: https://codereview.chromium.org/820133002
Patch from Lukasz Anforowicz <[email protected]>.
Cr-Commit-Position: refs/heads/master@{#311968}
15 files changed